when i use imwrite command this appear to me "Unable to open file for writing. You may not have write permission"
., please i need help to solve this

 採用された回答

Jan
Jan 2021 年 5 月 16 日

0 投票

If you specify a folder, in which you do not have write permissions, you cannot create a file there. If you omit a folder in the file name, the current folder is used.
folder = tempdir;
img = rnd(100, 100, 3);
imwrite(img, fullfile(folder, 'YourFile.png'));
Does this fail also?

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

質問済み:

2021 年 5 月 16 日

回答済み:

Jan
2021 年 5 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by