Error evaluating sectioned code
显示 更早的评论
I recently updated from R2014b to R2017b, and I've noticed a new, somewhat annoying behavior. In older versions of Matlab, I could section my code like this:
%%Section 1:
x = 1 + 2;
%%Section 2:
y = [5 ;
Sectioning code makes it easy to evaluate one chunk at a time, while I'm still working on other parts of the script. Just put the cursor anywhere in Section 1, hit Ctrl+Enter, and it'll evaluate everything in Section 1. However, R2017b now refuses to calculate anything unless the entire script is in perfect working order. If I try to evaluate Section 1 of the code above I get this error:
Error: File: test.m Line: 7 Column: 11
This statement is incomplete.
Yes, Matlab, I know. I'm still working on Section 2, but can I just evaluate Section 1? Is there any way to get the old behavior back?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!