필터 지우기
필터 지우기

How can I plot a function

조회 수: 1 (최근 30일)
Alen
Alen 2013년 3월 14일
Hi Matlab,
I need help to plot a function.
The function is the following:
f(x) = exp(-x/8.76*10^-6)*3.83*10^-4
>> h = ezplot('exp(-x./(8.76.*10.^6)).*3,83.*10.^-4') Error using inlineeval (line 15) Error in inline expression ==> exp(-x./(8.76.*10.^6)).*3,83.*10.^-4 Error: Unexpected MATLAB expression.
Error in inline/feval (line 34) INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
Error in ezplotfeval (line 52) z = feval(f,x(1));
Error in ezplot>ezplot1 (line 467) [y, f, loopflag] = ezplotfeval(f, x);
Error in ezplot (line 145) [hp, cax] = ezplot1(cax, f{1}, vars, labels, args{:});
  댓글 수: 1
Carlos
Carlos 2013년 3월 14일
편집: Carlos 2013년 3월 14일
What is the x interval for your plot? From the documentation. By default ezplot(fun) plots the expression fun(x) over the default domain -2π < x < 2π, where fun(x) is an explicit function of only x.

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

답변 (2개)

Walter Roberson
Walter Roberson 2013년 3월 18일
The error is because you used comma in 3,83 instead of decimal point 3.83

Masoud Ghanbari
Masoud Ghanbari 2013년 3월 17일
Hi
syms x
h = ezplot(exp(-x./(8.76.*10.^6)).*(3.83).*(10.^-4))

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by