print stopped working in MatLab 2017b, possibly after Windows 10 update. Is there a fix?.

2 ビュー (過去 30 日間)
Robert Barlow
Robert Barlow 2019 年 10 月 21 日
コメント済み: Håkon Storheim 2020 年 4 月 15 日
print worked yesterday (saving png format), but not today. There was a Win 10 update on this computer yesterday, so i wonder if that broke something.
  2 件のコメント
Steven Lord
Steven Lord 2019 年 10 月 21 日
Can you clarify what "stopped working" means? Do you receive an error or warning message or do you simply not receive any hard-copy from your printer? If you received an error (red text) or warning (orange text) message, can you show the full and exact text of that message? Copy and paste the whole message into a comment.
Robert Barlow
Robert Barlow 2019 年 10 月 21 日
No error or warning message. I am using print([plotPath plotName],'-dpng'); to save the current plot to a file. The file just does not show up in the folder. The path is unchanged from what worked yesterday. I can save the plot as a png file manually, using save as. I also checked '-dpdf', and the file was not saved.

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

回答 (1 件)

Steven Lord
Steven Lord 2019 年 10 月 21 日
Does plotPath end with the file separator character returned by filesep? If not, check one directory up to see if there's a file whose name has the last part of plotPath and the whole plotName together. If this is the cause of the problem you should probably use fullfile instead of manually combining the path and name together. It handles the case where plotPath or plotName start with a file separator.
Do you still have write permission to the directory where you're trying to save the file? I'm not certain why a system update would matter for that, unless you're trying to write to a directory that the operating system manages, but it's worth checking. [Though if that were the case I'd expect you to receive a warning or error ...] Maybe if you're trying to write to a network drive it might matter.
  2 件のコメント
Robert Barlow
Robert Barlow 2019 年 10 月 21 日
plotPath ends with \
I just checked a different plotting script that I ran yesterday without a hitch and that one also does not work. No error message, the file just does not show up, and the old file from yesterday remains in the folder. Very odd.
The folder in on my machine, not the network, and it is in my normal directory structure. I keep all my working files in a folder at the top level of the C drive.
Håkon Storheim
Håkon Storheim 2020 年 4 月 15 日
Did you find any solution to this problem?,
I am experiencing the same thing: trying to 'print' a figure, or using 'saveas', with scripts that worked just fine before, will not save any thing, and no error message shows up. Working local on C drive just like Robert.

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by