I always get my graphical output in a separate window, rather than on the same window next to the slide. How do I sort this issue?
83 次查看(过去 30 天)
显示 更早的评论
1 个评论
Rik
2022-1-7
Without your code it is difficult to tell.
You should probably use explicit handles to graphical objects.
回答(1 个)
BhaTTa
2024-1-2
Hey @Vignesh Suresh
In MATLAB, graphical outputs typically appear in separate figure windows. However, if you're using MATLAB's Live Editor, figures can appear inline within the document. If you're not seeing inline figures in the Live Editor, try the following steps:
- Open your Live Script (*.mlx file).
- Click on any figure output in your Live Script.
- On the top right of the figure, click the "Dock Figure" button to toggle between inline and windowed figures.
If you're using a standard MATLAB script (*.m file) and you want to manage figure windows programmatically, you can use the figure function with properties to control the behavior:
figure('WindowStyle', 'docked'); % Docks the figure within the MATLAB IDE.
Issue with fevalJSON Function in MATLAB
The error message you're seeing indicates that the input function is not supported in the MATLAB environment you're using. This is likely because you're using MATLAB Online or another MATLAB product offering that does not support interactive input due to its non-interactive execution model.
To work around this issue, you will need to modify the fevalJSON function to avoid using the input function. Here's a general approach you could take:
- Identify the part of the code where input is used.
- Replace input with an alternative way of obtaining input, such as passing the required information as function arguments or using a pre-defined variable.
For example, if the original code is:
function result = fevalJSON(...)
% Some code
userInput = input('Please enter a value: '); % This is not supported in MATLAB Online
% Some more code
end
You could change it to:
function result = fevalJSON(userInput, ...)
% Some code
% Now userInput is a parameter of the function, not gathered using input()
% Some more code
end
And then call fevalJSON with the necessary input:
userInputValue = ...; % Define the value that would have been entered by the user
result = fevalJSON(userInputValue, ...);
By making this change, you remove the dependency on the input function and can pass the required information directly when you call fevalJSON.
If you need further assistance with the code, please provide the specific part of the code that's causing the issue, and I can give you more detailed guidance.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!