Lists in matlab to store iterative data.
10 次查看(过去 30 天)
显示 更早的评论
Hello!, I am new to Matlab so excuse me if my question is too stupid. I wanted to know if there is something like list to store dynamic data. Similar to dynamically allocated arrays in C?
0 个评论
采纳的回答
Aakash Deep
2018-6-8
Hello Nilesh,
From your question I understand that you are trying to add a new value into your pre-defined vector. So for this you can just append the new value into the end of the vector, just like below
A = [A x]
where, A is your pre-defined vector and x is your new value.
Hope this helps :)
1 个评论
Walter Roberson
2018-6-8
If you are putting a scalar onto the end of a vector, then the shortcut is
A(end+1) = x;
更多回答(2 个)
Stephen Devlin
2018-6-8
I store dynamically generated data in cell arrays or tables all the time, can you show some of your code/data?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!