Azzera filtri
Azzera filtri

getting a flat surface graph

5 visualizzazioni (ultimi 30 giorni)
Tom
Tom il 9 Gen 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 Commento
Matt Fig
Matt Fig il 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)

Accedi per commentare.

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by