creating matrix with the same size for different variables
Mostrar comentarios más antiguos
hello
i want to creat N number of matrix 2x2 from different variabless then plottting the elemnt (2,1)./(1,1) using for loop but it i always get the last matrix only which overwrite all the previous ones.
who can help me please ?
x=linspace(eps,pi/2,200)
D11=1+sin(x)-cos(x);
D12=1-sin(x)-cos(x);
D21=1-sin(x)+cos(x);
D22=1+sin(x)+cos(x);
for i=1:numel(x)
D=0.5.*[D11(1,i) D12(1,i) ; D21(1,i) D22(1,i)];
end
plot(D(2,1)./D(1,1),x)
Respuesta aceptada
Más respuestas (1)
sadek kouz
el 10 de Mzo. de 2019
0 votos
1 comentario
Star Strider
el 10 de Mzo. de 2019
As always, my pleasure.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!