how to save array in different dimension
显示 更早的评论
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 个评论
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
2022-2-17
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!