how to save array in different dimension
Mostrar comentarios más antiguos
Greetings!
I have a loop that calculates ri:
for i = 1:length(x)
ri(i)=sqrt(((x(i)-xs)*111.1)^2)+(((y(i)-ys)*85.3)^2)+((z(i)-zs)^2);
end
Output is an array 1x77, but I need 77x1.
I tried, ti==array 77x1
if isequal(indt,ri)==0;
ri=transpose(ri);
end
But it didn't work.
I'm new to MatLAB and can not find a way how to solve it, anyone can help me please?
2 comentarios
please define your input variable x,xs,y,ys,z,zs or attach your data.
if your output ri is 1*77 array just use transpose.
ri=randi(10,1,77);
output=ri'
Alisher Khodjaev
el 17 de Feb. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing 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!