save an image in a directory
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I used: print('-dtiff','example.tif') in my code. now, i need to save the image (example.tif) in a specified directory. My code is: baseFileName = sprintf('TEST%d.tif', j); fullFileName = fullfile(pathName, baseFileName); imwrite(example, fullFileName);
but this error occurs: ??? Undefined function or variable 'example' any idea?
tnx, Azi
0 件のコメント
採用された回答
その他の回答 (1 件)
Jan
2011 年 8 月 17 日
Look in the documentation of IMWRITE: IMWRITE(A, filename) expects A to be an array containing the pixel values. But in your code "example" is not a defined variable.
I assume you want to move the file:
movefile('example.tif', fullFileName);
Most likely Jiang's answer would be better: Sinmply create the picture file at the wnated location directly.
4 件のコメント
Fangjun Jiang
2011 年 8 月 17 日
Nice! You are right. You speaks my mother tongue. You got talent, Jan!
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!