Closed mrkento11 closed 2 years ago
why are you using \\ instead of \ in your paths??? C:\\Users\\newsu\\Desktop\\GEP1.pdf"
is not a valid Windows path name
I used to write codes in Python, so in Python I was taught to use double backslash ("\") when dealing with strings so as the interpreter to not confuse it with a different command. For instance, the string "\n" will create a new line. So as to prevent any kind of misinterpretation when using append_pdfs I also tried with double backslash instead of just single.
Given the error that append_pdfs is displaying, I just tried many things including adding double backslash after single didn't work. However, apparently MatLab correctly interprets the double backslash:
So, the path name
C:\\Users\\newsu\\Desktop\\GEP1.pdf"
should be as valid as C:\Users\newsu\Desktop\GEP1.pdf"
.
Moreover, I tried both, and the output error is exactly the same.
So, I was considering that that is not really the problem so something else. Thanks for your time.
I don't know what's going on with your code and if all the file paths are correct - you will need to debug this on your own.
One error for certain in your code is that your command export_fig(Figures_Route + "\" + Naam + ".pdf",[fig],-append);
is wrong - you need to put the -append
in a string, otherwise Matlab will think that you want to do the negative value of the append
variable or function which is obviously silly.
That actually did help. Thanks for your help and time.
Hi Altmany. I am fairly new at coding, and I am trying to use both export_fig and append_pdfs to create some reports. When running the following code:
I get this error :
In some other instances, the error reads:
I have tried:
Also, in case the problem is related, when trying to append several figures in a single file using export_fig I have the following problem:
The following error pops up:
Perhaps it is a foolish error I might be making, but I need the help because I've run out of ideas on how to fix it. In case you need more details, or outright need me to send you my code, I will gladly do so. Thanks.