Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
7 years 前
已回答 vector equals to value in matrix
A=0.9997 and changing A in a loop are 2 different things.
This code will return 1.
gg=(0.35:0.0001:2);
A=0.9997;
a...
已回答 Create a new matrix with the for loop
If (big if) i interpreted your code right you are trying to do something like this:
w_u = zeros(361,361,252);
w_v = ...
7 years 前 | 0
| 已接受
已回答 Replacing a value with nan
I read about this lately, NaN never equals NaN (some IEEE stuff).
But you can use _isnan_ instead.
7 years 前 | 0
已回答 Assign index to a matrix?
i think you could use eval to create your variable names
for i=1:50
name=strcat('E',num2str(i));
prettyE(i)=eval(...