MATLAB Answers

Why does y come out as one number?

조회 수: 1(최근 30일)
Jinkyu Kwon
Jinkyu Kwon 29 Mar 2018
Answered: madhan ravi 7 Jul 2018
I put x as a variable but y comes out as one number whats wrong?

  댓글 수: 0

로그인 to comment.

답변 수 (2)

Roger Stafford
Roger Stafford 29 Mar 2018
Roger Stafford 님이 편집함. 29 Mar 2018
The scalar result is caused by the use of matrix division rather than element-by-element division. Replace '/' by './'. Similarly replace '^2' by '.^2' .

  댓글 수: 2

Jinkyu Kwon
Jinkyu Kwon 29 Mar 2018
thank you but can you help me with this problem too?
Roger Stafford
Roger Stafford 29 Mar 2018
It looks as if the dot in front of the asterisk in ".^2.*1.79" is being mistaken for a decimal point after the 2. Try putting parentheses around the 2: ".^(2).*1.79"

로그인 to comment.


madhan ravi
madhan ravi 7 Jul 2018
You put x as numerical Data.
If you want to get result in terms of x then x has to be defined as a symbolic variable. i.e.,
syms x
This would give you the desired result.

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by