how to use two for loop in one matlab program

for z=1:3
v(z) = zeros(1,length(x));
for ii = 1:numel(x)
V = roots([S0(ii),-S1(ii),S2(ii),-S3(ii)]);
v(z)(ii) = sqrt((V(z,1))./p);
end
end

Réponses (1)

M
M le 30 Jan 2019

0 votes

You should read this:
You cannot write v(z)(ii) but you should consider 2 dimensional data and acces it using v(z,ii).

Catégories

En savoir plus sur Polynomials dans Centre d'aide et File Exchange

Question posée :

le 30 Jan 2019

Modifié(e) :

le 30 Jan 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by