Error while attempting mesh plot

5 ビュー (過去 30 日間)
Pedro Ribeiro
Pedro Ribeiro 2022 年 10 月 12 日
編集済み: Walter Roberson 2024 年 8 月 2 日
I was experimenting in the Matlab live script editor and I tried to make a mesh plot of a hilbert spectrum, but instead of the plot I obtained an error:
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using getByteStreamFromArray
Error during serialization
Error in matlab.internal.editor.figure.SerializedFigureState/serialize
Error in matlab.internal.editor.FigureProxy/createWebFigureSnapshot
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.saveSnapshot
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
Here is the problematic code:
mesh(seconds(t),f,hs, 'EdgeColor', 'none', 'FaceColor', 'interp')
xlabel('Time (s)')
ylabel('Frequency (Hz)')
zlabel('Instantaneous Energy')
Any idea why I am getting this error?
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 10 月 12 日
Is it possible that you ran out of memory?

サインインしてコメントする。

回答 (1 件)

Gowthami
Gowthami 2022 年 10 月 18 日
Hi Pedro,
It is my understanding that you encountered the error "Error using getByteStreamFromArray" while plotting in the Live Editor.
As a workaround, you can add the following command immediately after your plotting command(s):
>> uicontrol('Visible','off')
This will prevent the figure from being serialized, and hence prevent the error. Note, that this will cause the figure to then both be displayed in the Live Script and in a new figure window.
  1 件のコメント
Mehdi Dehghan
Mehdi Dehghan 2024 年 8 月 2 日
Thank you, your command worked in my case.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by