While using the Live Editor, why does no output appear in the command window when I click the Run button?

27 vues (au cours des 30 derniers jours)
I have entered commands in the live editor but see no output in the command window when I select the Run button?
syms t n
T= 2*pi; % T= Period
w0=1; % Fundamental anguler freg
n=1:10; % n=1 fundamental, n>1 harmonics
v(t) =100+100*cos(t);
a0= (1/T)*int(v(t),t,0,T)
an=(2/T)*int(v(t)*cos(n*w0*t),t,0,T)
bn=(2/T)*int(v(t)*sin(n*w0*t),t,0,T)
  2 commentaires
jithin kumar palepu
jithin kumar palepu le 24 Fév 2023
Also, to display the output of a line in the live script, don't put a semicolon at its end.
Avnish
Avnish le 29 Mar 2025
Modifié(e) : Avnish le 29 Mar 2025
i had been experiencing the same issue, but on Matlab online, but I found a trick that might help you to some extent, specially if your code is not too long. So, instead of using the run action I am now using "Step" which outputs the answer step by step in the command window.

Connectez-vous pour commenter.

Réponses (1)

Areej Varamban Kallan
Areej Varamban Kallan le 21 Jan 2019
Hi Gary,
This is an expected behaviour. In live scripts, MATLAB displays output to the right of the code. Each output is displayed with the line that creates it. The live editor captures all the outputs within the file containing the code.
  2 commentaires
savneet singh
savneet singh le 4 Fév 2021
that did not answer his answer as to why he can't see the output on the right when he runs the code
Walter Roberson
Walter Roberson le 4 Fév 2021
I seem to recall that particular release had a bug in Live Script... but I do not recall the details at all (it did not affect me.)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by