getting a flat surface graph
4 ビュー (過去 30 日間)
古いコメントを表示
I've got this equation, which I wanted to see a plot of so I put it into Matlab hoping to gain a little insight. Instead I just get a flat surface, which is not what Mathematica shows. Here's the code,
close all;
clear all;
f=linspace(0,1000,50);
t=linspace(0,0.0005,50);
[ff,tt] = meshgrid(f,t);
x=4-cos(2*pi*ff*tt);
surf(ff,tt,x)
1 件のコメント
Matt Fig
2012 年 11 月 2 日
I've got this equation, which I wanted to see a plot of so I put it into Matlab hoping to gain a little insight. Instead I just get a flat surface, which is not what Mathematica shows. Here's the code,
close all;
clear all;
f=linspace(0,1000,50);
t=linspace(0,0.0005,50);
[ff,tt] = meshgrid(f,t);
x=4-cos(2*pi*ff*tt);
surf(ff,tt,x)
採用された回答
Walter Roberson
2012 年 1 月 9 日
x = 4 - cos(2 .* pi .* ff .* tt);
Remember, * is matrix multiplication.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!