フィルターのクリア

Adding time vector to 3D surf plot

2 ビュー (過去 30 日間)
John
John 2011 年 9 月 6 日
I have generated a 3D surf plot with force (y) against car-number (x) and time (actually row number of the matrix which relates to time) (z).
The z-axis is plotting the row number of the from the matrix which contained the data for x and y. From my ODE I have a time vector (T) of suitable size which has the times in it relating to the row numbers.
Currently it (z) is 0:10000 and I have a vector T size(10000,1). How to I replace the z-axis with the time from that vector (T)?
Do you require more information to understand what I am saying?

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 9 月 6 日
set(gca,'zticklabel',T)
  2 件のコメント
John
John 2011 年 9 月 7 日
I tried this but it does not work.
surf( cforce );
shading interp
lighting phong
set(gca,'zticklabel',T)
title('Forces'), zlabel('Force (N)')
xlabel('Item #'), ylabel('Relative Time/Time')
where cforce is a a x b matrix with length the same as time (T).
What should I try next?
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 7 日
I don't have your data so just give this example.
a=membrane;
figure(1);surf(a);
figure(2);surf(a);set(gca,'zticklabel',100:100:400);

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by