Why is my workspace empty after running a script?

22 visualizzazioni (ultimi 30 giorni)
hongkang ni
hongkang ni il 12 Giu 2021
Commentato: Image Analyst il 13 Giu 2021
After running a script, there is neither variable 'a' nor 'ans' shown in workspace, but I can still use the command 'whos' to make them appear in the command windows. How to fix my workspace?
  6 Commenti
hongkang ni
hongkang ni il 13 Giu 2021
This bar is a float window of an anti-virus software, not a scroll bar. The three characters on the top exactly means workspace. If I add
workspace;
in my script, the broder of the workspace turns blue, just like what happens when I clicked on the workspace.
Image Analyst
Image Analyst il 13 Giu 2021
I'd just call tech support and tell them it's not installing properly because nothing shows up in the workspace panel. If I run your code, it shows up just fine. The tech support for installation is free (even for student editions) and fast.

Accedi per commentare.

Risposte (1)

Image Analyst
Image Analyst il 12 Giu 2021
Something is not right with what you've shown. You have a semicolon after the "a=1" so that means when you type Untitled into the command window it should not echo the value of a to the command window as you have shown. Please give us the actual code. Like, maybe you declared it as a function instead of a script so that the a vanishes after the function completes execution.
When I do it, the a does not echo to the command window, and the a is definitely in the workspace panel.
  1 Commento
hongkang ni
hongkang ni il 12 Giu 2021
Maybe this picture is a little confusing, since I add the semicolon after run the script once. And you can see that there is no echo after the latest ">> Untitled" in the command window. I have never used any function and this is the actual code.
My MATLAB was working very well until yesterday, and I know that the variables in a function will not shown in the workspace.

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by