Symbolic equation messed up LIVE script
Ältere Kommentare anzeigen
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 Kommentare
Javier Bastante
am 16 Mär. 2016
Bearbeitet: Javier Bastante
am 16 Mär. 2016
It works great to me man...
timo
am 16 Mär. 2016
Christopher Creutzig
am 17 Mär. 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
am 17 Mär. 2016
Antworten (0)
Kategorien
Mehr zu Code Performance finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!