Rebecca Johnston

20 Reputation

2 Badges

18 years, 140 days

MaplePrimes Activity


These are replies submitted by Rebecca Johnston

I came up with a more convoluted solution - counterstring:=sprintf(" Frame# %d\n t=%g\n V=%e\n alpha1=%e\n alpha2=%e\n", ii, t_curr, V_arr[10,ii], alpha1_arr[10, ii], alpha2_arr[10,ii]): (sorry for the unnecessary detail there) then title=counterstring but your way would have been faster! I guess with the more complicated approach I can better control what the numbers look like, though. Thank you!
I came up with a more convoluted solution - counterstring:=sprintf(" Frame# %d\n t=%g\n V=%e\n alpha1=%e\n alpha2=%e\n", ii, t_curr, V_arr[10,ii], alpha1_arr[10, ii], alpha2_arr[10,ii]): (sorry for the unnecessary detail there) then title=counterstring but your way would have been faster! I guess with the more complicated approach I can better control what the numbers look like, though. Thank you!
Hi David, Having looked more closely, I can't see how this will do the job. The 'title' command is fine to print out text, but when I use this command, tmp_alpha_plot||ii:=display([ plot([seq([r_arr[i],alpha1_arr[i,ii]],i=0..nr)]), plot([seq([r_arr [i],alpha2_arr[i,ii]],i=0..nr)], color=magenta), tmp_other_bit_fluid1], title=ii): I get the error message Error, (in plot/options2d) unknown or bad argument: title = 1 That is, the command only lets you print text in the title - I want to be able to print out, say, the value of ii and the value of alpha1_arr at each ii, on the plot. I'm trying to see if I can print out the current time value as a string using printf in the time loop, but it doesn't appear that printf will do this. Is there something obvious I'm overlooking? Thanks, Rebecca.
Hi David, Having looked more closely, I can't see how this will do the job. The 'title' command is fine to print out text, but when I use this command, tmp_alpha_plot||ii:=display([ plot([seq([r_arr[i],alpha1_arr[i,ii]],i=0..nr)]), plot([seq([r_arr [i],alpha2_arr[i,ii]],i=0..nr)], color=magenta), tmp_other_bit_fluid1], title=ii): I get the error message Error, (in plot/options2d) unknown or bad argument: title = 1 That is, the command only lets you print text in the title - I want to be able to print out, say, the value of ii and the value of alpha1_arr at each ii, on the plot. I'm trying to see if I can print out the current time value as a string using printf in the time loop, but it doesn't appear that printf will do this. Is there something obvious I'm overlooking? Thanks, Rebecca.
Page 1 of 1