Effacer les filtres
Effacer les filtres

getting a flat surface graph

5 vues (au cours des 30 derniers jours)
Tom
Tom le 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 commentaire
Matt Fig
Matt Fig le 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)

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 9 Jan 2012
x = 4 - cos(2 .* pi .* ff .* tt);
Remember, * is matrix multiplication.
  1 commentaire
Tom
Tom le 9 Jan 2012
Of course - thanks.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by