MATLAB: Does MATLAB 7.5 (R2007b) open two figure windows when only one is expected
duplicateextraMATLAB
I execute the following FIGURE command and two figures are opened.
figure('Colormap',jet);
I expect to see only one figure window, since the FIGURE command is only called once.
Best Answer
When the JET function is called inside the FIGURE command, it will create a new figure if no figure is already open. This results in having two figure windows, the first one created by JET, and the second one by FIGURE.
To work around this issue you can divide the command in two separate parts:
figure;
colormap(jet);
Note that the same issue could arise if there existed open figures, but their 'HandleVisibility' was set to 'off'.
This behavior is expected, and is due to the following:
If there are no input arguments to GRAY, the colormap property value 'gray' will call GCF to get the default Colormap length, and this will create the new figure.
As a workaround, specify the colormap length in the command as follows:
Although MATLAB does not define the Whittaker M and W functions, they can be evaluated numerically using the Symbolic Math Toolbox. You may evaluate them with a syntax similar to
mfun('WhittakerM',1,1,[1 2 3])
which evaluates the Whittaker function M_1^1(x) at the points x = 1, 2, and 3.
More information about Whittaker functions may be found by evaluating the command
Best Answer