MATLAB: Getting a flat surface graph

surf

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)

Best Answer

x = 4 - cos(2 .* pi .* ff .* tt);
Remember, * is matrix multiplication.
Related Question