![]() |
how plot structures whithout for loop?
<p>I have three structures 1x103 : Steps, Time and Loc. All 3 have 2 fields (contr and prost, each line is a 30x1 double)</p>
<p>I would like to plot theses structure without for loops like : </p> <pre><code>figure plot(Time.Contr, Steps.Contr), hold on, plot(Time.Contr, Loc.Contr) </code></pre> <p>But I get an error : "Vectors must be the same length."</p> <p>I tried <code>plot(Time(:).Contr, Steps(:).Contr)</code> and got the same error I thought about using "<code>cellfun</code>" but I don't have cell arrays but double arrays</p> <p>Is there any other solution than using a for loop ?</p> [url=https://stackoverflow.com/questions/59028953/how-plot-structures-whithout-for-loop]More answer...[/url] |
所有时间均为北京时间。现在的时间是 19:49。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.