plot3 gives strange plot
古いコメントを表示
I want to plot 3 signal for comparision as in 3d view, so that I can clearly observe the change in different signals.

For an example I want to plot 3 sin signals with different frequencies.
t = [0:0.1:20];
A = 1;
f = 10000;
y1 = A*sin(1000*t);
y2 = A*sin(1250*t);
y3 = A*sin(1500*t);
plot3(y1,y2,y3);
the plot is very strange. where have I gone wrong ?

If i do as plot3(y1,y2,y3,t); it gives error as no enough arguments. Please suggest me how can i plot as the first figure
採用された回答
その他の回答 (2 件)
John BG
2017 年 1 月 16 日
refine, your plot is suffering alias.
What about this
format long;t = [0:0.00001:0.1];
A = 1;
y1 = A*sin(1000*t);
y2 = A*sin(1250*t);
y3 = A*sin(1500*t);
plot3(y1,y2,y3);
.

.
It doesn't seem you are using this line
f = 10000;
would you please be so kind to consider marking my answer as Accepted Answer?
thanks for time and attention, awaiting answer
Star Strider
2017 年 1 月 16 日
The ribbon plot may do what you want.
The Code —
t = [0:0.1:20];
A = 1;
f = 10000;
y1 = A*sin(1000*t);
y2 = A*sin(1250*t);
y3 = A*sin(1500*t);
figure(1)
hr = ribbon(t, [y1; y2; y3]', 0.1)
grid on
set(hr, 'EdgeColor','none')
axis([xlim ylim [-2 2]])
view([-50 45])
The Plot —

Experiment to get the result you want.
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
