Filter löschen
Filter löschen

getting a flat surface graph

5 Ansichten (letzte 30 Tage)
Tom
Tom am 9 Jan. 2012
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 Kommentar
Matt Fig
Matt Fig am 2 Nov. 2012
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)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Jan. 2012
x = 4 - cos(2 .* pi .* ff .* tt);
Remember, * is matrix multiplication.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by