No results from calculations in the command window

12 次查看(过去 30 天)
Hi there,
For some reason I am not getting any output results in the command window. I click on run and no results appear in the command window from my script. Nor, is there any results in the workspace - even though there a lots of calculations. I have restarted my computer and still there is no change. The last thing I was doing was trying to create a MATLAB function. Also, in the editor tab the option to create a new scipt is faded out. So I can't access a new script. I have been using MATLAB online for months and I have never experienced this problem or any problem like it.
I am very confused and I do not know what is going wrong!
I hope someone can help?
Many thanks,
Scott

采纳的回答

Star Strider
Star Strider 2025-7-22
I am not certain that I fully understasnd your problem.
MATLAB functions have their own workspaces, so variables local to the function will not appear in the workspace window.
I am not certain what you are doing, however be sure to actually call the function (with all appropriate arguments), and return as many outputs as the function produces, at least to troubleshoot this.
  13 个评论
Scott Banks
Scott Banks 2025-7-22
That's brilliant, Star Strider. I was just going to go for the closet column for a single value, If I would have used interpolation I would have probably tried to incorporate the formula - y = y1 + (x - x1)/(x2 - x1)*(y2 - y1). Which would have had much more code. Great one!
Star Strider
Star Strider 2025-7-22
编辑:Star Strider 2025-7-23
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
EDIT -- (23 Jul 2025 at 00:55)
Note that there are also stepwise interpolation methods available, notably 'previous', 'next', and 'nearest'.
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by