Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Why does y come out as one number?

1 Ansicht (letzte 30 Tage)
Jinkyu Kwon
Jinkyu Kwon am 29 Mär. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I put x as a variable but y comes out as one number whats wrong?

Antworten (2)

Roger Stafford
Roger Stafford am 29 Mär. 2018
Bearbeitet: Roger Stafford am 29 Mär. 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 Kommentare
Jinkyu Kwon
Jinkyu Kwon am 29 Mär. 2018
thank you but can you help me with this problem too?
Roger Stafford
Roger Stafford am 29 Mär. 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"

madhan ravi
madhan ravi am 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.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by