Gelöst


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...

mehr als 7 Jahre vor

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
Why I am getting the error message:Assignment has more non-singleton rhs dimensions than non-singleton subscripts
tmvVV(i,j)=vpasolve(teqsd(i,j),tmv); This line returns 2 values, but tmvVV(i,j) has only 1 field. Adding a third dimension ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Why when i load workspace manually the code works but when i try to load it from code doesn't?
If you use load('mynet.mat') in command line you will load all variables in mynet.mat to your workspace. Hence myNet will exist ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Error when generating a for loop with unifrnd
r(i) only has 1 field and you try to store 12 values. Try a = 0; b = 1:6; r=zeros(1000,12); for i = 1:1000; r(i,:)...

mehr als 7 Jahre vor | 1

Beantwortet
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 = ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Replacing a value with nan
I read about this lately, NaN never equals NaN (some IEEE stuff). But you can use _isnan_ instead.

fast 8 Jahre vor | 0

Beantwortet
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(...

fast 8 Jahre vor | 0