rashid

5 Reputation

2 Badges

12 years, 358 days

MaplePrimes Activity


These are replies submitted by rashid

I am sorry that I didn't make my self clear.

I want to get the data from the following matrix in a list form, i.e., (eta, theta(eta)) or (eta, theta'(eta))

 

dsol1 =

[ [ d ] ]
[ [eta, theta(eta), ---- theta(eta)] ]
[ [ deta ] ]
[ ]
[[0. 0.99999999999999966 -2.00009080289507857 ]]
[[ ]]
[[0.1 0.818722419231693976 -1.63753564135846785 ]]
[[ ]]
[[0.2 0.670305029469085767 -1.34070086183325165 ]]
[[ ]]
[[0.3 0.548791086437177998 -1.09767297576943590 ]]
[[ ]]
[[0.4 0.449303903593814002 -0.898698610082707684]]
[[ ]]
[[0.5 0.367850686839103268 -0.735792176573286328]]
[[ ]]
[[0.6 0.301162432551384196 -0.602415667997848181]]
[[ ]]
[[0.7 0.246562716826171980 -0.493216236547423859]]
[[ ]]
[[0.8 0.201860243912376974 -0.403811290719833737]]
[[ ]]
[[0.9 0.165260959824035132 -0.330612722543150161]]
[[ ]]
[[1.0 0.135295999450271404 -0.270682801795622596]]
 
The output in a .txt file should look like this
eta theta(eta)
0.     0.99999999999999966
.
.
.
0.8    0.201860243912376974
1.0    0.135295999450271404
 
I tried the following one but its not working
 
fd := fopen("data1.txt",'WRITE');
for k from 0 to 10 by 0.1 do
fprintf(fd,"%a %a %a\n"
,eval([eta,theta(eta),diff(theta(eta),eta)],dsol1(k)));
end do;
fclose(fd);
 
Thanks

I am sorry that I didn't make my self clear.

I want to get the data from the following matrix in a list form, i.e., (eta, theta(eta)) or (eta, theta'(eta))

 

dsol1 =

[ [ d ] ]
[ [eta, theta(eta), ---- theta(eta)] ]
[ [ deta ] ]
[ ]
[[0. 0.99999999999999966 -2.00009080289507857 ]]
[[ ]]
[[0.1 0.818722419231693976 -1.63753564135846785 ]]
[[ ]]
[[0.2 0.670305029469085767 -1.34070086183325165 ]]
[[ ]]
[[0.3 0.548791086437177998 -1.09767297576943590 ]]
[[ ]]
[[0.4 0.449303903593814002 -0.898698610082707684]]
[[ ]]
[[0.5 0.367850686839103268 -0.735792176573286328]]
[[ ]]
[[0.6 0.301162432551384196 -0.602415667997848181]]
[[ ]]
[[0.7 0.246562716826171980 -0.493216236547423859]]
[[ ]]
[[0.8 0.201860243912376974 -0.403811290719833737]]
[[ ]]
[[0.9 0.165260959824035132 -0.330612722543150161]]
[[ ]]
[[1.0 0.135295999450271404 -0.270682801795622596]]
 
The output in a .txt file should look like this
eta theta(eta)
0.     0.99999999999999966
.
.
.
0.8    0.201860243912376974
1.0    0.135295999450271404
 
I tried the following one but its not working
 
fd := fopen("data1.txt",'WRITE');
for k from 0 to 10 by 0.1 do
fprintf(fd,"%a %a %a\n"
,eval([eta,theta(eta),diff(theta(eta),eta)],dsol1(k)));
end do;
fclose(fd);
 
Thanks
Page 1 of 1