Items tagged with printf printf Tagged Items Feed

Hi,

I'm developing an application in Maple 14. I'm using the code below to print a percentage:

# Printing a percentage.
x:=0.7569:
printf("The value of x is %.1f%%%", x*100);

Is this the right way to print a percentage?

I also want to group digits (as in 1,959), but don't know how to do it.

Thanks in advance,

Carlos Mallen

Hi all,

A while ago, I had asked a question relating to calling to an MapleSim .msim simulation within maple .mw worksheet. (Thank you Acer! :) I got it working but then another issue just popped up...The basic structure is as follows:

********************************************************************

A := MapleSim:-LinkModel('filename' = "TriplePendulum_WORKS_v2.msim")

for z from 1 to 50 do

     initialize_variables;

HI,

 

I've got a MapleCode with exports the data in the end into an ".txt"-File. Now it's necessary to create an"Tab" instead of the semicolon, which is produced now between A and B.

Now: "A;B"

Should be: "A    B" (Tab between).

 

> fd := fopen("C:/ZZZ_TEST4.txt", WRITE);
                      ...

Hi, I want my output to be column vectors, how do I use the printf statement?

hi,i want my output be a complex number,how do i use the printf command?for example  s=3+4*i be a output.

I'm using the printf command and i want my output a decimal number to get it published

s1=0.5555552487 and f(s1)=0.2542365647 what should i do?

evaluated stage

December 01 2011 by icegood 255 Maple

How to make maple notify about calculated stage in example? As you can see fprintf+fflush doesnt work (hope stdout in maple has descriptor 0 as in others)...

eval_stage.mw

P.S. Don't wait procedure done. Just interrupt.

Is there a way to color the output text from command line, say using printf? 

printf("I want this output to be green for example");

Any alternate ways to produce colored text from the command line?

fprint command help

August 19 2011 by kh2n 215 Maple

hi

I want to have a fprint command which should given me the data in two columns.

I want to modifiy the following command

fprintf(fd,"%f \n",li,sigmai);

this command gives me data in horizental form, i.e.,

0.001000 0.300990 0.600980 0.900970 1.200960 1.500950 1.800940  2.100930
 
But i want it in the follwoing form
 li              sigma
0.001000 0.300990
 0.600980 0.900970

 

Can someone tell me why sprintf wont work in this situation?

 

out-of-balance_final.mw

restart:with(MultiSeries):with(plots):

parvalues:={C=2.02,H_liq=8.74,R=22.11,R1=0.0006};

G:=R3*k*(1-R1)/(C*Pec_i);

F1:=1/(R*S+1-S);

F:=F1*(1-R*G*S);

F2:=Pec_i*F;

A1:=Theta0/C=(exp(F2*(1-S))-1)*(H_liq+1/(1-exp(-C/k*F2*(S))));

R3values:= [0,-1,-3,-4]; colours:= [red,blue,green,black]; display([seq(plottools[transform]( unapply([k, subs(parvalues, Pec_i = -20, R3=R3values[i], F2)], (k,S))) (implicitplot(subs(parvalues,Theta0=4,R3=R3values[i...

Hi

The problem is, as said, how can i get a "math output" when having something typed into my package.. 

An example of this could be:

printf("\Your function is: x^2");

When typing it like this my output becomes x^2, I would like it to become x2 , how can I fix this?

 

- Slangers

Hi,

I'm trying to solve a nonlinear diff. equation numerically using (dsolve) but it gives me an

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging
my code is:
ode:= diff(f(x),x,x,x)+f(x)*diff(f(x),x,x)+B(1-(diff(f(x),x))^2=0   # f'''+f*f''+B(1-(f')2)=0
bcs:= f(0)=0,diff(f(x),x)(0)=0,diff(f(x),x)(5)=1                            # f(0)=0, f'(0)=0,f'(5)=1
Page 1 of 1