Community Profile

photo

Rik


Last seen: Today 2017 以来アクティブ

E-mails with feedback/questions about FEX submissions are welcomed. In general I will post e-mails about Answers on the related page, unless there is good cause not to do so.

Statistics

All
  • Treasure Hunt Participant
  • MATLAB Central Treasure Hunt Finisher
  • 36 Month Streak
  • Ace
  • Draw Letters
  • Community Group Solver
  • 5-Star Galaxy Level 4
  • GitHub Submissions Level 3
  • Indexing I Master
  • Cody Challenge Master
  • Introduction to MATLAB Master
  • Speed Demon

バッジを表示

Content Feed

表示方法

回答済み
Is the formula given the same as the code?
Since the exponents range from -1 to -7, that means you will need 7 different values for t. One of the ways to achieve that is i...

1日 前 | 0

| 採用済み

回答済み
I have a code but it keep saying "invalid expression. when calling a function or indexing a variable, use parentheses. otherwise check for mismatched delimiters.
The reason is these two lines: xx1=(0,8.*pi,1000) x3=(-4,4) Did you maybe forget linspace? Anyway, this isn't valid Matlab s...

3日 前 | 0

送信済み


regexp_outkeys
Regexp with outkeys in old releases

3日 前 | ダウンロード 2 件 |

回答済み
why \pi don't work??
Why did you expect it to? This isn't LaTeX. If you want the pi symbol in a character vector that is possible: char(960) Or yo...

3日 前 | 0

回答済み
arrays have incompatible sizes for this operation help me PLZ
I have removed all the plotting code and included calls to size to determine the sizes of all the variables involved. data_size...

5日 前 | 0

回答済み
How can I load .mat files?
Or: matfilenames={'Datasets/a.mat','Datasets/b.mat','Datasets/c.mat'}; for k = 1:3 S=load(matfilename{k}); fields=fi...

5日 前 | 1

| 採用済み

回答済み
How to fix "Error using == Arrays have incompatible sizes for this operation." in this code?
Let's have a look at the line that results in an error: n1=(sum(x.*y)-length(d)*mean(x)*mean(y))/(sum(x.^2)-length(d)*(mean(x)*...

5日 前 | 0

回答済み
The Problem with clc; clear; close all; ?
My main point is that people will get into the habit of using this, and will also use it in functions. Clear is almost never ...

6日 前 | 0

| 採用済み

回答済み
Stop using suggested word on right arrow
I just checked for you: If you go to the preferences (in the 'Home' tab), you can disable the automatic completions in the MATL...

7日 前 | 1

回答済み
Unable to use a value of type 'cell' as an index
You need to unwind the call to see what's going on. When you create r_4, you have set UniformOutput to false. That means it i...

7日 前 | 1

| 採用済み

回答済み
Extracting every row from a matrix using a for loop
This might not be optimal, depending on what you want to do, but the size function is here to help: data=rand(23999,31) for ro...

8日 前 | 0

回答済み
Loop in a string array and changing string
Why didn't you mention this is homework? (I have seen this exact situation from another user this week, so barring evidence to t...

8日 前 | 0

| 採用済み

回答済み
finding data from unique id in two tables
You can use the ismember function.

8日 前 | 1

| 採用済み

回答済み
Matrix-vector operations without loops
You can use permute to reshape the second array and use the implicit expansion to do the multiplication in one go. Then sum over...

9日 前 | 1

回答済み
There is an apparent error in line 4, and this code only ran once
t = [36, 65, 100, 160]; c = [0.145, 0.120, 0.100, 0.080]; t2 = (20:10:160); c2 = b*exp(t2*m); As you can see, you didn't def...

10日 前 | 0

回答済み
Inside of a for loop. How to call another script lets say (IK.m) as Ik sub every time the loop goes to a new point?
I don't see how exactly you would end up with 6 values for each point, but if you convert your script to a function, that will m...

10日 前 | 1

| 採用済み

回答済み
save data all of in loop
No loop required: num=xlsread('ENVISAT.ex.xlsx'); num=num(~isnan(num)); num=nonzeros(num); lon=num(1:2:end); lat=num(2:...

14日 前 | 0

| 採用済み

回答済み
Including external file is making workspace messy
Let me expand on the suggestion of @Mathieu NOE: Use functions, not scripts. Each function should have documentation explaining...

15日 前 | 1

| 採用済み

回答済み
Create matrix using the array as index
You don't even need a loop: a=[2 2 1 0 3]; ind=a+1; A=zeros(max(ind),numel(ind)); ind=sub2ind(size(A),ind,1:numel(ind)); ...

15日 前 | 0

| 採用済み

回答済み
deleting separate zeros from vector
It took a bit of thinking, but here is a oneliner: A = [ 0 0 1 0 0 0 1 0 1 0 0 1 5 9 8 2 0 3 0 1 0 0 0 ]; ...

17日 前 | 0

| 採用済み

回答済み
How can I interrupt a for or while loop by pressing a button 2?
You can tell Matlab to process callbacks with the drawnow function. If you put a call to drawnow just before you reload the val...

17日 前 | 0

| 採用済み

回答済み
Input the same value into a cell array that each cell contains different fits?
I don't think there is a way to actually avoid a loop. You can avoid a double loop like this: results=zeros(size(CellWithFitObj...

17日 前 | 0

回答済み
Compare two vectors in matlab n*m
You mean like this? A=[1 2 3 4 5 6 7 8 9 10]; B=4; result=zeros(size(A));%pre-allocate L= A<B ;result(L)=1; L= A==B;resul...

18日 前 | 0

| 採用済み

回答済み
Gui problem with workspace
Why do you want to use evalin? Just have your functions return outputs. Every function has its own workspace. To share data bet...

18日 前 | 0

回答済み
How can I plot a lot of data sets quickly?
Make sure you load the data to an array instead of numbered variables. That way you can use a simple for loop and indexing. htt...

18日 前 | 0

回答済み
Backward compatible functionSignatures.json
In that case my proposed solution would be implementing something like Jan suggested in his answer. Write a function similar to...

18日 前 | 1

| 採用済み

回答済み
Utilizing sqrt and square, "Check for incorrect argument data type or missing argument in call to function 'sqrt'"
As Stephen mentioned, the sqrt function expects either single or double. So you will have to convert it to either of those data ...

23日 前 | 0

回答済み
How to assign the size of a k-th column of a cell to the k+1-th?
When you execute this line: sbc{k}=size(cycles{k+1}) the k+1 element of cycles doesn't exist yet. You will have to make ...

24日 前 | 0

回答済み
How to store values from nested for loop
The first step to implement a summation in Matlab is very easy: just use a for loop. It is often possible to do this with a matr...

25日 前 | 1

| 採用済み

回答済み
How to create a matrix with nested for loop for fraction entries?
Why use loops at all? y=1; ii=0.5:.1:.7; jj=.4:.1:.6; [ii,jj]=ndgrid(ii,jj); mat=ii.*y.*jj; disp(mat)

25日 前 | 1

もっと読み込む