save data in for loops
显示 更早的评论
Hi everyone,
I am trying to save my data into a matrix, each time two columns as X and Y.
but the codes don't work.
Can anyone explain and help?
Thanks a lot.
coordinate= zeros();
for a=1:21
Z=[X Y];
X = snakes{1,a}.x;
Y = snakes{1,a}.y;
coordinate((a),:)= Z;
end
4 个评论
Ajay Kumar
2020-2-10
编辑:Ajay Kumar
2020-2-10
what is X?
what is Y?
why are you assigning X and Y to Z and declaring them after assigning?
what is snakes?
what is x?
what is y?
Stephen23
2020-2-10
yunwei hu's "Answer" moved here:
Hi there,
x, y and snakes are just data l got from somewhere else and need to evaluate.
the question here is how to get X an Y into two columns of a new matrix.
Ajay Kumar
2020-2-10
what is the format of those?
Could you upload x, y and snakes here.
yunwei hu
2020-2-10
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!