how to save array in different dimension
Ältere Kommentare anzeigen
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 Kommentare
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
am 17 Feb. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!