Symbolic equation messed up LIVE script

1 visualizzazione (ultimi 30 giorni)
timo
timo il 16 Mar 2016
Commentato: timo il 17 Mar 2016
Dear all I have the code
clear
syms R G1 G2 Gn
G = 1 / R
The output of last is
G= symans,32,0,321
Shouldnt it be 1/R ... I tried clear and i get the same garbled answer I wonder where i made the mistake , must be something really stupid LOL
  5 Commenti
Christopher Creutzig
Christopher Creutzig il 17 Mar 2016
Unlike your question, your file contains an additional clear all in the same section. Put a section break before that, and the output is as expected. (I created a defect report for this, to improve the behavior in future versions.)
Or maybe even better, reconsider using clear all altogether; in most cases, a simple clear is completely sufficient, if even that is needed.
timo
timo il 17 Mar 2016
The clear all was added by the converter automatically. I think it tries to clear "all" variable Anyway I rewrote the doc and now it works

Accedi per commentare.

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by