MaplePrimes Questions

"There were problems during the loading process. Your worksheet may be incomplete."

 

Pls fix this problem for me. I tried various things. The text in the worksheet is in Danish and contains danish letters (æøå) which may have caused the problem.

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/1._Opgaver.mw .
 

Download 1._Opgaver.mw

Download 1._Opgaver.mw

 

 

In a Maple worksheet i have created a module containing a few procedures. I wish to make the module accesible upon start-up as a package so that i can use my procedures in any maple document or worksheet with my package. How do i do this?

cutin.mws

Am trying to learn about commands in Maple 7 I have not come across before - namely cutin, cutout and project.  Am I correct in thinking these commands are for use in three dimensions, and won't work in two dimensions?  Examples in the Help section seem to be confined to 3D.

  In the attached program I created a triangle (triag)using the polygon feature, then used project(triag, [[0,0.5],[2,2]]) to see what the resultant plot would be.  It was a line segment with length of the triangle - as if it was the shadow of the triangle.  Am I right in thinking a 3D object would give a 2D shape using this project command?

Thanks, David 

I posted this earlier on a question I asked more than a month ago due to the similarity of the problem.  However, I got no response.  So I will post this as a new question in an effort to get a response.

I get the following error when working with the "INERT" Sum?

Warning, solutions may have been lost

I do not get the message when working with the "ACTIVE" sum.  I tried the AllSolutions option, but still get the same message.  How can I get the proper output working with the "INERT" form?

lost_solutions.mw

Hello Forum, 

I have a quick question i was hoping someone could help me with. 

Is there a way to put a line though "math" text like below

+8 = +8

to visualize that to values cancels each other out? 

I hope someone can help, i can´t find anything on google

Thanks in advance 
IllIN - 

hello my friends

I have a critical problem to solve below the system of differential equations

-(9/14)*R(t)^(19/14)-(285/196)*(diff(R(t), t, t))/R(t)^(9/14)+(2565/2744)*(diff(R(t), t))^2/R(t)^(23/14) = -k*(4*lambda+1/a(t)^3)

and R(t) = 6*((diff(a(t), t))^2/a(t)^2+(diff(a(t), `$`(t, 2)))/a(t))

I need to find form of a(t) numerically from set of differential equatios

plz help me as soon as possible

I just want to get 3 digits after the comma. I wrote something random, but I could not find the right one.What exactly do I have to write when I click on the custom?

Dear reader,

My questions about Multivariate Statistics are all programmed the hard way. When using R in the classroom, which has all the commands available this looks a little awkward. Thing is that every command should give a specific answer which can be related to a question box.

A little help would be nice. I am more than happy to share questions

$e=maple("Vector([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])");
$n=maple("evalf(Statistics[Count]($e))");
$k=2;
:// data input;
:// dependent variable Y;
$Y=maple("[11.259,11.238,11.492,11.479,11.016,11.241,10.949,10.690,10.964,10.733,10.493,10.684,10.459,10.595,10.953,10.838,10.545,10.806,10.455,10.299,10.608,10.605,10.536,10.492]");
$vY=maple("Vector([$Y])");
$nY=maple("evalf(Statistics[Count]($Y))");
$muY=maple("evalf(Statistics[Mean]($Y))");
$sumY=maple("add($Y)");
:// independent variable X1;
$X1=maple("[7.5,7.5,6.5,7,8,7.5,7.5,8,8.5,8,8,8.5,8,8,8,8,8,8,8.5,8.5,8.5,8,8,8]");
$vX1=maple("Vector([$X1])");
$nX1=maple("evalf(Statistics[Count]($X1))");
$muX1=maple("evalf(Statistics[Mean]($X1))");
$sumX1=maple("add($X1)");
:// independent variable X2;
$X2=maple("[22,22,20,22.5,21.5,22,21.5,21,21.5,21,20.35,21,20.35,20.75,21.5,21.35,20.75,21.1,20.35,20,20.75,20.75,20.75,20.35]");
$vX2=maple("Vector([$X2])");
$nX2=maple("evalf(Statistics[Count]($X2))");
$muX2=maple("evalf(Statistics[Mean]($X2))");
$stdvX2=maple("evalf(Statistics[StandardDeviation]($X2))");
$sumX2=maple("add($X2)");
:// independent variable X3;
$X3=maple("[8.01,9.1,8.39,8.37,8.73,9.11,7.52,7.17,7.54,7.24,6.79,7.09,3.6,6.95,7.52,7.34,5.82,7.29,5.68,5.45,6.97,8.03,5.8,4.69]");
$vX3=maple("Vector([$X3])");
$nX3=maple("evalf(Statistics[Count]($X3))");
$muX3=maple("evalf(Statistics[Mean]($X3))");
$stdvX3=maple("evalf(Statistics[StandardDeviation]($X3))");
$sumX3=maple("add($X3)");
$X3s=maple("$vX3.$vX3");
:// small variables based on deviation around average value;
$y=maple("$vY-$muY*$e");
$x1=maple("$vX1-$muX1*$e");
$x2=maple("$vX2-$muX2*$e");
$x3=maple("$vX2-$muX2*$e");
:// summation of deviation values;
$sumysq=maple("$y.$y");
$sumx1sq=maple("$x1.$x1");
$sumx2sq=maple("$x2.$x2");
$sumx3sq=maple("$x3.$x3");
$sumyx1=maple("$y.$x1");
$sumyx2=maple("$y.$x2");
$sumyx3=maple("$y.$x3");
$sumx1x2=maple("$x1.$x2");
$sumx1x3=maple("$x1.$x3");
$sumx2x3=maple("$x2.$x3");
:// calculation of the coefficients;
:// coefficient betha1;
$b1=maple("(($sumyx1)*($sumx2sq)-($sumyx2)*($sumx1x2))/(($sumx1sq)*($sumx2sq)-($sumx1x2)^2)");
$b2=maple("(($sumyx2)*($sumx1sq)-($sumyx1)*($sumx1x2))/(($sumx1sq)*($sumx2sq)-($sumx1x2)^2)");
$a=maple("($muY)-($b1)*($muX1)-($b2)*($muX2)");
:// calculate estimate based on given values;
$valuex1=range(8,8,1/10);
$valuex2=range(21,21,1/10);
$yhatvalue=$a+($b1)*$valuex1+($b2)*$valuex2;
:// standard deviations;
$stdvy=maple("evalf(Statistics[StandardDeviation]($y))");
$stdvx1=maple("evalf(Statistics[StandardDeviation]($x1))");
$stdvx2=maple("evalf(Statistics[StandardDeviation]($x2))");
$stdvx3=maple("evalf(Statistics[StandardDeviation]($x3))");
:// correlation coefficients;
$ryx1=maple("($sumyx1)/($n*$stdvy*$stdvx1)");
$ryx2=maple("($sumyx2)/($n*$stdvy*$stdvx2)");
$ryx3=maple("($sumyx3)/($n*$stdvy*$stdvx3)");
$rx1x2=maple("($sumx1x2)/($n*$stdvx1*$stdvx2)");
$rx1x3=maple("($sumx1x3)/($n*$stdvx1*$stdvx3)");
$rx2x3=maple("($sumx2x3)/($n*$stdvx2*$stdvx3)");
:// estimated values;
$Yhat=maple("($a)*$e+($b1)*$vX1+($b2)*$vX2");
$error=maple("$vY-$Yhat");
$sumerror=maple("$error.$e");
$sumerrorsq=maple("$error.$error");
:// $errortr=maple("LinearAlgebra[Transpose]($error)");
:// $sumerrorsq=maple("LinearAlgebra[MatrixMatrixMultiply]($errortr,$error)");
$errorstdv=maple("sqrt($sumerrorsq/($n-2-1))");
:// standard error of the coefficients;
$errorb1=maple("$errorstdv/sqrt((($sumx1sq*$sumx2sq)-(($sumx1x2)^2))/($sumx2sq))");
$errorb2=maple("$errorstdv/sqrt((($sumx1sq*$sumx2sq)-(($sumx1x2)^2))/($sumx1sq))");
:// R-squared;
$Rsq=maple("1-$sumerrorsq/$sumysq");
:// adjusted R-squared;
$Rasq=maple("1-($sumerrorsq/($n-$k-1))/($sumysq/($n-1))");
:// hypothesis: does variable X[i] influence Y? H[0]: it does not so b=0;
$tb1=maple("$b1/$errorb1");
$tb2=maple("$b2/$errorb2");
$Tdf=$n-$k-1;
$alpha=range(0.05,0.05,1/100);
$T=maple("Statistics[Quantile](StudentT($Tdf),(1-$alpha/2))");
$ptb1=maple("Statistics[CDF](StudentT($Tdf),$tb1)");
$ptb2=maple("1-Statistics[CDF](StudentT($Tdf),$tb2)");
 

 

Our students use R for solving digital questions about Multivariate Statistics made with MapleTA.

How to use a MLE in MapleTA. Below the code I used in a question?

Remaks about how to program this better or more easy are more than welcome.

://noise. In Dutch ruis means noise;
$ruislow=range(1,5,1);
$ruishigh=range(6,9,1);
://data 1;
$x1=10+rand($ruislow,$ruishigh,1);
$x2=30+rand($ruislow,$ruishigh,1);
$x3=50+rand($ruislow,$ruishigh,1);
$x4=70+rand($ruislow,$ruishigh,1);
$x5=90+rand($ruislow,$ruishigh,1);
$x6=125+rand($ruislow,$ruishigh,1);
$x7=175+rand($ruislow,$ruishigh,1);
$X=maple("Vector([$x1,$x2,$x3,$x4,$x5,$x6,$x7])");
$displayX=maple("printf(MathML:-ExportPresentation($X))");
$TX=maple("LinearAlgebra[Transpose]($X)");
$displayTX=maple("printf(MathML:-ExportPresentation($TX))");
://data 2;
$y1=4+rand($ruislow,$ruishigh,1);
$y2=12+rand($ruislow,$ruishigh,1);
$y3=32+rand($ruislow,$ruishigh,1);
$y4=36+rand($ruislow,$ruishigh,1);
$y5=42+rand($ruislow,$ruishigh,1);
$y6=36+rand($ruislow,$ruishigh,1);
$y7=19+rand($ruislow,$ruishigh,1);
$Y=maple("Vector([$y1,$y2,$y3,$y4,$y5,$y6,$y7])");
$displayY=maple("printf(MathML:-ExportPresentation($Y))");
$TY=maple("LinearAlgebra[Transpose]($Y)");
$displayTY=maple("printf(MathML:-ExportPresentation($TY))");
://data 3;
$z1=76+rand($ruislow,$ruishigh,1);
$z2=108+rand($ruislow,$ruishigh,1);
$z3=128+rand($ruislow,$ruishigh,1);
$z4=54+rand($ruislow,$ruishigh,1);
$z5=18+rand($ruislow,$ruishigh,1);
$z6=4+rand($ruislow,$ruishigh,1);
$z7=1+rand($ruislow,$ruishigh,1);
$Z=maple("Vector([$z1,$z2,$z3,$z4,$z5,$z6,$z7])");
$displayZ=maple("printf(MathML:-ExportPresentation($Z))");
$TZ=maple("LinearAlgebra[Transpose]($Z)");
$displayTZ=maple("printf(MathML:-ExportPresentation($TZ))");
://totals;
$t1=$y1+$z1;
$t2=$y2+$z2;
$t3=$y3+$z3;
$t4=$y4+$z4;
$t5=$y5+$z5;
$t6=$y6+$z6;
$t7=$y7+$z7;
$T=maple("Vector([$t1,$t2,$t3,$t4,$t5,$t6,$t7])");
$displayT=maple("printf(MathML:-ExportPresentation($T))");
:// percentage Y;
$py1=$y1/$t1;
$py2=$y2/$t2;
$py3=$y3/$t3;
$py4=$y4/$t4;
$py5=$y5/$t5;
$py6=$y6/$t6;
$py7=$y7/$t7;
:// percentage Z;
$pz1=$z1/$t1;
$pz2=$z2/$t2;
$pz3=$z3/$t3;
$pz4=$z4/$t4;
$pz5=$z5/$t5;
$pz6=$z6/$t6;
$pz7=$z7/$t7;
://odds;
$o1=$py1/$pz1;
$o2=$py2/$pz2;
$o3=$py3/$pz3;
$o4=$py4/$pz4;
$o5=$py5/$pz5;
$o6=$py6/$pz6;
$o7=$py7/$pz7;
://logit;
$ln1=ln($o1);
$ln2=ln($o2);
$ln3=ln($o3);
$ln4=ln($o4);
$ln5=ln($o5);
$ln6=ln($o6);
$ln7=ln($o7);
$L=maple("Vector([$ln1,$ln2,$ln3,$ln4,$ln5,$ln6,$ln7])");
$displayL=maple("printf(MathML:-ExportPresentation($L))");
://linreg;
://$fit1=maple("Statistics[LinearFit]([1,t],$X,$L,t)");
$fit=maple("map(rhs, Statistics[Fit](a*x+b, $X, $L, x, output=parametervalues))");
$intercept=maple("$fit[2]");
$slope=maple("$fit[1]");
$r=maple("evalf(Statistics[Correlation]($X,$L))");

Best regards,

Nico

 

Hi everybody,

I have written a module (let's say MyModule) that  I use as a package in a worksheet (with(MyModule)).

At some point in my worksheet I call the procedure MyProc which is part of MyModule.
I find it not to work as expected. So I modify it within MyModule and generate again the archive which contains this module.

Because my worksheet does a lot of things before the call to MyProc, I would like to test quickly the above modifications.
The idea is to do :
unwith(MyModule):  # packages() no longer exhibits its name
with(MyModule);      # to load the corrected one

Unfortunately, contrary to what happens with a "native" package,  the command unwith(MyModule) is ineffective:

  • once done showstat(MyProc) still displays the content of the procedure, and running  the command MyProc(...) proves that it still "exists" in the worksheet
     
  • forcing a reload of MyModule ( with(MyModule) ) and acanning again MyProc ( showstat(MyProc) ) reveals the code MyProc had when MyModule has been loaded for the first time.

 

Is it possible to "free" a user package through the "unwith" command ?

Hope to read you soon, TIA


PS : to be clearer

A worksheet contains  the definition of N procedures, plus the one of MyModule, and ends with the commands to generate an archive file named MyModule.mla.
MyModule is defined that way

MyModule := module()
option package

export Proc1 := eval(:-Proc1),
           ......
           MyProc := eval(:-MyProc),
           ......
           ProcN := eval(:-ProcN):
end module
 

 

hellow can we draw the figure like this

How can I install GeM software from the link http://cpc.cs.qub.ac.uk/?

I have tried many times but I didn't get.

 

@mskalsi

I was trying the direct method for conservation law of wave equation.But the fluxes and conserved density are not coming correct in eq.(4)(see attached file) because (1) and (6) are not same.What mistake have I done?

 

 

wave_eq_3.mws

Dear friends~I knew that I can copy each function's code into one worksheet bue it's tedious if I need to call many functions.So I want to find another approach with maple's statement.

Thank you ~

Hi,

I have problem with plot of the function ( See attachment)
 

Chargement plots

plot((x^3-x^2)^(1/3), x)

 

``

 

 

``

``

``


 

Download PlotProblème.mw

First 854 855 856 857 858 859 860 Last Page 856 of 2427