필터 지우기
필터 지우기

getting a flat surface graph

조회 수: 5 (최근 30일)
Tom
Tom 2012년 1월 9일
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
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
Walter Roberson 2012년 1월 9일
x = 4 - cos(2 .* pi .* ff .* tt);
Remember, * is matrix multiplication.
  댓글 수: 1
Tom
Tom 2012년 1월 9일
Of course - thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by