Use of assignment '=' in plot command?
3 views (last 30 days)
There is a lot of ways to ask this question and it is maybe more of a discussion topic, but with ~10 years of medium MATLAB use I got a bit confused by this way of calling plot so I ask:
Should this code run/work?
Or maybe I just missed some release notes explaining this?
Stephen23 on 18 Jan 2022
Edited: Stephen23 on 18 Jan 2022
That name-value sytnax was introduced in R2021a:
% ^^^^^^^^^^^ this syntax introduced R2021a
"Or maybe I just missed some release notes explaining this?"
The new syntax is explained in the MATLAB documentation, MATLAB blogs, and Release Notes:
Before R2021a you will have to use the old approach (which of course still works in the newer versions):