plotting data in an non orthogonal coordinate system
20 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I stored different values in a matrix, values calculated with a formula f based on non otrhogal axis. The values represent forces in geometric surface in a non orthoganal coordinate system.

My question: How to plot the values on the surface in an non orthogonal coordinate system?
Thanks in advance!
0 件のコメント
採用された回答
Azzi Abdelmalek
2013 年 2 月 7 日
編集済み: Azzi Abdelmalek
2013 年 2 月 7 日
3D plot
close
k=10
x=0:0.1:10
y=sin(x)
z=10*x.*y
plot3(x,y,z)
%----------New coordinate system------------------
b=sqrt(3)/2;
a=1/2;
hold on
plot3([0 a],[0 b],[0 0],'g') % new axis
plot3(xlim ,[0 0],[0 0],'g')
%----------New x,y and z in the new coordinate system---
new_x=y*a+x;
new_y=y*b;
hold on,
plot3(new_x,new_y,z,'r')
grid
0 件のコメント
その他の回答 (4 件)
Azzi Abdelmalek
2013 年 2 月 7 日
編集済み: Azzi Abdelmalek
2013 年 2 月 7 日
close
x=0:0.1:10
y=sin(x)
plot(x,y)
% If you want to plot in the the new coordinate system newvector_j=a+b*j,
% we suppose the unit vector i is the same
a=1;
b=2;
hold on
plot([0 a],[0 b],'g') % new axis
plot(xlim ,[0 0],'g')
new_x=y*a+x
new_y=y*b
hold on,plot(new_x,new_y,'r')
0 件のコメント
Dirk
2013 年 2 月 7 日
編集済み: Dirk
2013 年 2 月 7 日
1 件のコメント
Azzi Abdelmalek
2013 年 2 月 7 日
Sorry, it's not t but x, I've edited the answer. 'r' (red) , 'g' (green) are the color of the plots. copy and past the code, then run it. For your 3D plot I will try something
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
