can someone help me ? , something error in my code

조회 수: 1 (최근 30일)
ZEYAD SAAD
ZEYAD SAAD 2018년 11월 30일
댓글: ZEYAD SAAD 2018년 11월 30일
Untitled.png

채택된 답변

Torsten
Torsten 2018년 11월 30일
f = 200*x./(x+5).*exp(-2*x/30)

추가 답변 (1개)

John D'Errico
John D'Errico 2018년 11월 30일
편집: John D'Errico 2018년 11월 30일
Please don't post a picture of your error. Text works just fine, and then we can copy your code and paste it into MATLAB.
Anyway, it works just fine for me. What is the problem? Maybe you need to learn what the .* and ./ and .^ operators do? They are there to do element-wise operations.
a = 0;
b = 30;
x = a:5:b;
f = 200*x./(x+5).*exp(-2*x/30)
f =
0 71.653 68.456 55.182 42.176 31.479 23.2
That tends to suggest you need to read the getting started tutorials for MATLAB, where you would learn exactly these things. In the end, it will be time well spent.

카테고리

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