필터 지우기
필터 지우기

No line on graph

조회 수: 6 (최근 30일)
Zane  Wilkinson
Zane Wilkinson 2015년 8월 4일
편집: Walter Roberson 2015년 8월 4일
Hey guys first week using matlab and trying to graph this...
fplot(@(t)(((-0.005*pi*sqrt(5)*t)./2)+(2*sqrt(5)).^2), ([0,37.3,40,80]))
but when i press enter no lines show up on the grid.
any advice is great
Thanks
zane :)

답변 (1개)

Al Dente
Al Dente 2015년 8월 4일
your function:
z = @(t)(((-0.005*pi*sqrt(5)*t)./2)+(2*sqrt(5)).^2);
z(0:37.3) % would output values in the range of 19.3 to 20
From the matlab documentation:
FPLOT(FUN,LIMS) plots the function FUN between the x-axis limits specified by LIMS = [XMIN XMAX].
Using LIMS = [XMIN XMAX YMIN YMAX] also controls the y-axis limits.
so you're basically telling the function to plot y values from 40 to 80 even though your output ranges between 19 to 20

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by