필터 지우기
필터 지우기

Problems with exp-functions

조회 수: 1 (최근 30일)
Alexander Engman
Alexander Engman 2016년 1월 23일
댓글: Alexander Engman 2016년 1월 23일
Hi!
I want to make a function of x.
This is my code:
x=(0:0.001:5); %x-values
f=2*x*exp(-x);
plot(x,f)
But MatLab is telling me:
Error using *
Inner matrix dimensions must agree.
What does this mean in this case and how do I solve it?

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 23일
f=2*x.*exp(-x);
  댓글 수: 1
Alexander Engman
Alexander Engman 2016년 1월 23일
Thanks, I figured it out!

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by