- Need to clarify row/column in your question
- You can use random number to make your example
- Why not use a for-loop
how do I plot specific columns from a cell array?
11 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have a cell array of 49 columns and each stores temperature values and has different row numbers. That is IntTemperatures. I want to plot specific rows from that cell array, let say 1, 11, 21, 31 and 41.
for k=1:layers-1
IntTemperatures{k}=Tnodes(timepoints*k+1:end,(k*2)+1); %Temperatures of interlayers
end
If it was a matrix than this could work, so I am trying to do something like this
layerpicks=[1,11,21,31,41];
plot(time./60,IntTemperatures(:,layerpicks),'.')
I have tried this by looking at the other comments
figure;
hold on;
cellfun(@plot,IntTemperatures);
However, this prints everything and I do not have the control of the x axis.
Thank you!
1 件のコメント
Fangjun Jiang
2020 年 6 月 4 日
回答 (1 件)
madhan ravi
2020 年 6 月 4 日
layerpicks=[1,11,21,31,41];
plot(time/60,cell2mat(IntTemperatures(:,layerpicks)),'.')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!