Items tagged with fprintf fprintf Tagged Items Feed

Hello experts in Maple,

I'm going to solve IVP numerically by this command bellow:

var:={u(t),v(t),w(t)}: 
dsys1 :=diff(u(t),t)=-(Gamma+AM*cos(q*t+phi))*u(t)+(Delta-AM*sin(q*t+phi))*v(t)+Omega*w(t), diff(v(t),t)=-(Delta+AM*sin(q*t+phi))*u(t)-(Gamma-AM*cos(q*t+phi))*v(t), diff(w(t),t)=-0.5-2*Gamma*w(t)-Omega*u(t):
dsol1 :=dsolve({dsys1,ini1},numeric,method=lsode,var, abserr=1e-9, relerr=1e-8,output=listprocedure):
dsolu:=subs(dsol1,u(t)):dsolv:=subs(dsol1,v(t)):dsolw:=subs(dsol1,w(t)):...

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);
                      ...

printing output to file

December 14 2011 by PatrickT 1668 Maple

I would like to export-to-file a list containing equations, variables, and constants, e.g.

xyz := [dx = x*y-(1/3)*(y-z), dy = -0.01*x, dz = z/10];
I have used fprintf to write to a file. The closest I got to what I want is by doing:
fd := fopen("xyz.m", WRITE) :
fprintf( fd, %s,  CodeGeneration[Matlab](xyz,'output'=string) ):
fclose(fd) :

Using CodeGeneration[Matlab] was the only way I found to export a list like xyz above, simply writing fprintf...

Page 1 of 1