Need Help ?

Home / Expert Answers / Other / matlab-help-3-variables-in-the-workspace-all-variables-created-by-a-script-file-are-left-in-the-glob

(Answered): matlab help 3. Variables in the workspace: All variables created by a script file are left in the gl ...



matlab help3. Variables in the workspace: All variables created by a script file are left in the global workspace. You can get informati

3. Variables in the workspace: All variables created by a script file are left in the global workspace. You can get information about them and access them, too: • Type who to see the variables present in your workspace. You should see the variables r, theta, x and y in the list. • Type whos to get more information about the variables and the workspace. • Type (theta' x' y'] to see the values of 8, # and y listed as three columns. All three variables are row vectors. Typing a single right quote (' on the keyboard) after their names transposes them and makes them column vectors. 4. Contents of the file: You can see the contents of an M-file without opening the file with an editor. The contents are displayed by the type command. To see the contents of circle... type type circle... 5. Hi line: The first commented line before any executable statement in a script file is called the HI line. It is this line that is searched by the lookfor command. Since the lookfor command is used to look for M-files with keywords in their description, you should put keywords in Hi line of all M- files you create. Type lookfor unit to see what MATLAB comes up with. Does it list the script file you just created!


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to 3. Variables in the workspace: All variables created by a script file are left in the global workspace. You can get info...
We have an Answer from Expert

Buy This Answer $4

Place Order