Error when creating animation from graph in OctaveCreating animation with multiple plots - Octave/MatlabGraph Formatting Tools For OctaveWhy/when should I prefer MATLAB over Octave?How do I create a simple Octave distributable without installing OctaveOctave: 'rgb2gray' undefined errorCreating Function in OctaveOctave: How to create a legend for grouped bar graphs?Animating plot with matlab / octaveOctave : fsolve function errorCreating animation in python from Octave codeoctave graph background color changing

Do pedestrians imitate automotive traffic?

I want light controlled by one switch, not two

Flashing the ESP8266 12F from raspberry

Improving an O(N^2) function (all entities iterating over all other entities)

How do you name this compound using IUPAC system (including steps)?

Was demon possession only a New Testament phenomenon?

How electronics on board of JWST can survive the low operating temperature while it's difficult to survive lunar night?

Why isn't a binary file shown as 0s and 1s?

Is encryption still applied if you ignore the SSL certificate warning for self-signed certs?

Should I work for free if client's requirement changed

How to tell readers that I know my story is factually incorrect?

Why is this guy handcuffed censored?

Legendre Polynomial Integral over half space

Why teach C using scanf without talking about command line arguments?

Is it possible to have a career in SciComp without contributing to arms research?

Locked-up DOS computer beeped on keypress. What mechanism caused that?

How was Luke's prosthetic hand in Episode V filmed?

Linux ext4 restore file and directory access rights after bad backup/restore

Do higher dimensions have axes?

Discontinuous Tube visualization

Why does a tetrahedral molecule like methane have a dipole moment of zero?

The most secure way to handle someone forgetting to verify their account?

Do Australia and New Zealand have a travel ban on Somalis (like Wikipedia says)?

I have found a mistake on someone's code published online: what is the protocol?



Error when creating animation from graph in Octave


Creating animation with multiple plots - Octave/MatlabGraph Formatting Tools For OctaveWhy/when should I prefer MATLAB over Octave?How do I create a simple Octave distributable without installing OctaveOctave: 'rgb2gray' undefined errorCreating Function in OctaveOctave: How to create a legend for grouped bar graphs?Animating plot with matlab / octaveOctave : fsolve function errorCreating animation in python from Octave codeoctave graph background color changing






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am trying to make an animation from a graph and save the result as gif or video.
The graph and the animation work well in matlab but I cannot save it as gif.



'imread' gives error:



Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "- 
dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-
sOutputFile=C:Users ...


I tried the solution from here, but that error pops up.



this is my code:



clear all;
clc;

for m = 1:10
n = m.*100;

x = linspace(0,1500,1500);
x2 = linspace(n,1000+n,500);

y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];

y1 = zeros(1,n);
y3 = zeros(1,1000-n);
y7 = [y1 y2 y3];
y8 = y7 + 0;

y1 = (sin(pi/150*x)).^2;
y3 = exp((x/400)-5);

y5 = (y1.*y3)+y8;

plot( x,y5);
drawnow;
#pause(0.01);
endfor


im = imread ("animation.pdf", "Index", "all");
imwrite (im, "animation.gif", "DelayTime", .5);


EDIT:
this is the complete error. directory address is edited.



 Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (F:XXXXXXXXXXXXXXXXXXXXXXXXXXanimation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
__imread__ at line 78 column 10
imageIO at line 118 column 26
imread at line 106 column 30
test_animation2 at line 6 column 4









share|improve this question
























  • There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

    – Andy
    Mar 26 at 14:23











  • You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

    – Tasos Papastylianou
    Mar 26 at 18:04











  • @TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

    – Codelearner777
    Mar 27 at 5:25












  • assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

    – Tasos Papastylianou
    Mar 27 at 11:05











  • This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

    – Tasos Papastylianou
    Mar 27 at 11:06

















0















I am trying to make an animation from a graph and save the result as gif or video.
The graph and the animation work well in matlab but I cannot save it as gif.



'imread' gives error:



Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "- 
dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-
sOutputFile=C:Users ...


I tried the solution from here, but that error pops up.



this is my code:



clear all;
clc;

for m = 1:10
n = m.*100;

x = linspace(0,1500,1500);
x2 = linspace(n,1000+n,500);

y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];

y1 = zeros(1,n);
y3 = zeros(1,1000-n);
y7 = [y1 y2 y3];
y8 = y7 + 0;

y1 = (sin(pi/150*x)).^2;
y3 = exp((x/400)-5);

y5 = (y1.*y3)+y8;

plot( x,y5);
drawnow;
#pause(0.01);
endfor


im = imread ("animation.pdf", "Index", "all");
imwrite (im, "animation.gif", "DelayTime", .5);


EDIT:
this is the complete error. directory address is edited.



 Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (F:XXXXXXXXXXXXXXXXXXXXXXXXXXanimation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
__imread__ at line 78 column 10
imageIO at line 118 column 26
imread at line 106 column 30
test_animation2 at line 6 column 4









share|improve this question
























  • There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

    – Andy
    Mar 26 at 14:23











  • You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

    – Tasos Papastylianou
    Mar 26 at 18:04











  • @TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

    – Codelearner777
    Mar 27 at 5:25












  • assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

    – Tasos Papastylianou
    Mar 27 at 11:05











  • This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

    – Tasos Papastylianou
    Mar 27 at 11:06













0












0








0








I am trying to make an animation from a graph and save the result as gif or video.
The graph and the animation work well in matlab but I cannot save it as gif.



'imread' gives error:



Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "- 
dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-
sOutputFile=C:Users ...


I tried the solution from here, but that error pops up.



this is my code:



clear all;
clc;

for m = 1:10
n = m.*100;

x = linspace(0,1500,1500);
x2 = linspace(n,1000+n,500);

y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];

y1 = zeros(1,n);
y3 = zeros(1,1000-n);
y7 = [y1 y2 y3];
y8 = y7 + 0;

y1 = (sin(pi/150*x)).^2;
y3 = exp((x/400)-5);

y5 = (y1.*y3)+y8;

plot( x,y5);
drawnow;
#pause(0.01);
endfor


im = imread ("animation.pdf", "Index", "all");
imwrite (im, "animation.gif", "DelayTime", .5);


EDIT:
this is the complete error. directory address is edited.



 Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (F:XXXXXXXXXXXXXXXXXXXXXXXXXXanimation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
__imread__ at line 78 column 10
imageIO at line 118 column 26
imread at line 106 column 30
test_animation2 at line 6 column 4









share|improve this question
















I am trying to make an animation from a graph and save the result as gif or video.
The graph and the animation work well in matlab but I cannot save it as gif.



'imread' gives error:



Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "- 
dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-
sOutputFile=C:Users ...


I tried the solution from here, but that error pops up.



this is my code:



clear all;
clc;

for m = 1:10
n = m.*100;

x = linspace(0,1500,1500);
x2 = linspace(n,1000+n,500);

y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];

y1 = zeros(1,n);
y3 = zeros(1,1000-n);
y7 = [y1 y2 y3];
y8 = y7 + 0;

y1 = (sin(pi/150*x)).^2;
y3 = exp((x/400)-5);

y5 = (y1.*y3)+y8;

plot( x,y5);
drawnow;
#pause(0.01);
endfor


im = imread ("animation.pdf", "Index", "all");
imwrite (im, "animation.gif", "DelayTime", .5);


EDIT:
this is the complete error. directory address is edited.



 Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:UsersXXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (F:XXXXXXXXXXXXXXXXXXXXXXXXXXanimation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
__imread__ at line 78 column 10
imageIO at line 118 column 26
imread at line 106 column 30
test_animation2 at line 6 column 4






octave






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 11:21







Codelearner777

















asked Mar 26 at 11:34









Codelearner777Codelearner777

641 silver badge11 bronze badges




641 silver badge11 bronze badges












  • There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

    – Andy
    Mar 26 at 14:23











  • You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

    – Tasos Papastylianou
    Mar 26 at 18:04











  • @TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

    – Codelearner777
    Mar 27 at 5:25












  • assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

    – Tasos Papastylianou
    Mar 27 at 11:05











  • This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

    – Tasos Papastylianou
    Mar 27 at 11:06

















  • There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

    – Andy
    Mar 26 at 14:23











  • You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

    – Tasos Papastylianou
    Mar 26 at 18:04











  • @TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

    – Codelearner777
    Mar 27 at 5:25












  • assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

    – Tasos Papastylianou
    Mar 27 at 11:05











  • This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

    – Tasos Papastylianou
    Mar 27 at 11:06
















There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

– Andy
Mar 26 at 14:23





There is no error in your posted snippet and I'm pretty sure it's from plot and not imread. Please add MCVE

– Andy
Mar 26 at 14:23













You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

– Tasos Papastylianou
Mar 26 at 18:04





You seem to have forgotten the print animation.pdf -append step in your code above, but, other than that, I cannot reproduce your error. The code works fine and produces a .gif as expected on my machine.

– Tasos Papastylianou
Mar 26 at 18:04













@TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

– Codelearner777
Mar 27 at 5:25






@TasosPapastylianou, where should I add print animation.pdf -append ? I tried the code again, and yes, it reproduce the error that I attached in my post.

– Codelearner777
Mar 27 at 5:25














assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

– Tasos Papastylianou
Mar 27 at 11:05





assuming you're trying to do what Carandraug did in the linked post, the whole point is that you append one pdf 'page' to this file at each iteration of your loop, so that by the end you have a pdf with exactly as many pages as the number of frames you'll want in your animation.gif. In your code above you forgot to do the 'appending' step (I mean, you never even generate an animation.pdf file to begin with, where do you expect to read it from in the first place?). If I place that line just above the endfor instruction, everything works as expected for me.

– Tasos Papastylianou
Mar 27 at 11:05













This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

– Tasos Papastylianou
Mar 27 at 11:06





This has nothing to do with imagemagick though, so I doubt the error you're getting is related ... unless you've created some sort of mismatched animation.pdf from earlier and you're getting an error while trying to read it.

– Tasos Papastylianou
Mar 27 at 11:06












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55356164%2ferror-when-creating-animation-from-graph-in-octave%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55356164%2ferror-when-creating-animation-from-graph-in-octave%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript