Problem with print function

Hi, I use print('-f1', filename, '-djpeg') to save a figure into a remote drive and it worked as a charm yesterday.
But for some strange reason, it stoped working and keep giving me this error: Error in print (line 85) pj = name( pj );
I checked and can manually save the figure into that drive with a different file name. I also checked that there is not conflict file name on that drive. But it just keeps issuing this error. Why all the sudden it is not working? I have full access to that remote drive; and the file name is new; and I can save it manually and I can save the figure to my local drive.
Thanks for any help!

댓글 수: 6

Steven Lord
Steven Lord 2018년 1월 26일
What is the full text (everything in red) of the error message you received?
JFz
JFz 2018년 1월 26일
Thanks. Here is what it looks like: '\\aaaaaaaa.bbbbbb.com\ccccc$\ddd eee\fff & ggg\filename.jpg' I could save it yesterday.
JFz
JFz 2018년 1월 26일
Error using name (line 102) Cannot create output file '\\aaaaaaaa.bbbbbb.com\ccccc$\ddd eee\fff & ggg\filename.jpg'
Can you display the value of the filename variable with which you call print? Showing the size and class of that variable would help too. The following commands will show that information.
disp(filename)
size(filename)
class(filename)
JFz
JFz 2018년 1월 26일
I just found the error here. The filename is concatenated and one part (which indicates date) is wrong. I think that is the reason.
JFz
JFz 2018년 1월 26일
Thanks Steven

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

JFz
2018년 1월 26일

댓글:

JFz
2018년 1월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by