Hey, Mathworks had the answer! I inserted save('April16') after that line, and voila, April.16.mat has the variables for me to view.
Viewing variables after a script runs?
5 次查看(过去 30 天)
显示 更早的评论
I am trying to add some features to a 515 line script my boss wrote. I'm fairly new to Matlab, but I have figured out what I want to do--I just need to understand the variables he is using. (I'm trying to add standard error to a linear fit, using polyfitn).
For example, in this line of code on line 373:
[Fit_coeffsAve, S] = polyfit(DdateSR_rel, mean(RatioSR), 1);
I would like to see what values are in Fit_coeffsAve. And of course, once the script runs, the functions do not save data in the workspace. I've tried making that variable global--the entire script runs perfectly, but nothing is saved in the workspace. Thanks for any help you can provide!
3 个评论
Rik
2020-4-16
Once you have done a Matlab tutorial you should understand why that is an inefficient method. And you should really re-read the documentation for global and never use it again until you do understand in.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!