Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments about / errors in example: Template_DBar #3

Closed
Kevin-Mattheus-Moerman opened this issue Oct 22, 2018 · 6 comments
Closed

Comments about / errors in example: Template_DBar #3

Kevin-Mattheus-Moerman opened this issue Oct 22, 2018 · 6 comments

Comments

@Kevin-Mattheus-Moerman
Copy link

Kevin-Mattheus-Moerman commented Oct 22, 2018

About Template_DBar.m

  1. When I run this example I receive a question on the command prompt Enter output time-step:, please can you add a suggested sensible time-step? E.g. rephrase it as Enter output time-step (e.g. 1):
  2. After entering 1 as the output time-step I get the following error message:
Error using animateTenseg (line 29)
The specified profile is not valid.

Error in Template_DBar (line 147)
animateTenseg(t,y,tData,time_loc,'DBar_Animation.mp4','MPEG-4',frameRate,AZ, EL,axLims);

I am using a 64-bit Ubuntu 18.04 machine with MATLAB R2018b.

@Kevin-Mattheus-Moerman Kevin-Mattheus-Moerman changed the title Readme comments Comments about / errors in example: Template_DBar Oct 22, 2018
@Kevin-Mattheus-Moerman
Copy link
Author

I get the same error for other examples

@Kevin-Mattheus-Moerman
Copy link
Author

Based on this link:
https://www.mathworks.com/help/matlab/ref/videowriter.html#d120e1333847

It seems the profile is what you refer to as format. On that link there is a comment for MPEG-4which says:

MPEG-4 file with H.264 encoding (systems with Windows 7 or later, or Mac OS X 10.7 and later)

So this seems to be a Linux issue. Something like this will fix this:

if ispc
    formatSpec='MPEG-4';
    fileName='TBar_Animation.mp4';
else
    formatSpec='Motion JPEG AVI';
    fileName='TBar_Animation.avi';
end
animateTenseg(t,y,tData,time_loc,fileName,formatSpec,frameRate,AZ,EL,axLims);

@Kevin-Mattheus-Moerman
Copy link
Author

Side note, if you want to avoid issues like this you could animate it in MATLAB directly (e.g. see the anim8 function in the GIBBON toolbox I maintain).

@vaishnavtv
Copy link
Contributor

Thank you @Kevin-Mattheus-Moerman, I'll make the suggested change to the output time-step prompt. 0.01 is usually chosen as the output time-step to ensure higher accuracy.
It is generally recommended that the 'Refine' option be turned on in ODE options to avoid errors due to numerical extrapolation, but I see that the Template file itself doesn't have it included in the options. I'll make the change there and also edit the User Guide to reflect the prompt change.

I'll also make the necessary changes as suggested about the VideoWriter format. Thank you for the GIBBON recommendation. I'll take a look.

@vaishnavtv
Copy link
Contributor

Fixed. Added OS check to animateTenseg.m and updated prompt message for output time-step.

@Kevin-Mattheus-Moerman
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants