フィルターのクリア

save Matrix immediately?

2 ビュー (過去 30 日間)
denis bertin
denis bertin 2017 年 10 月 15 日
編集済み: denis bertin 2017 年 10 月 15 日
Hi everyBody,
please i have this error code when i try save immediately matrix:
Undefined variable "malta1t_H" or class "malta1t_H.asc".
NOTE: the matrix name malta1t_H.asc already exist. I just want to save image like malta1t_H_H.png, without load it first. code:
NP1=942;
d = 0.02*(NP1-1);
xx = linspace(0,d,NP1);
figure('visible','off');
saveas(imagesc(xx,t,malta1t_H.asc'), 'malta1t_H_H.png');

回答 (1 件)

dpb
dpb 2017 年 10 月 15 日
imagesc(xx,t,malta1t_H.asc')
imagesc doesn't read a file; it only operates on an image array already in memory.
Also you're missing the leading quote on the filename as the last argument anyway, even if it were allowed input syntax. The syntax malta1t_H.asc' asks for the transpose of what looks like a field asc in a structure variable maltat_H.
  1 件のコメント
denis bertin
denis bertin 2017 年 10 月 15 日
編集済み: denis bertin 2017 年 10 月 15 日
Please can you write the correct code? i still have the same error.
I want to save the image with custom name give it.
thank you.

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by