Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   Help with Maple (https://thetfp.com/tfp/tilted-technology/108222-help-maple.html)

wombatman 09-05-2006 04:56 PM

Help with Maple
 
I figure I'm shooting in the dark with this question, but there might be a mathematician out there who can help with this problem. Basically, I'm trying to use Maple 10.0 to solve a homework problem and encountering an "Error: Cannot determine whether this expression is true or false" followed by a ton (think page-long) of exponentials. Here is the code:

Code:

CAexp := matrix(6, 1, [10, 5.0, 3.5, 1.1, .5, .1]);

x := matrix(6, 1, [0, 1, 2, 3, 5, 7]);

CAmodel := theta1*exp(-theta2*t);

CApred := matrix(6, 1, [seq(eval(CAmodel, {t = x[j, 1]}), j = 1 .. 6)]);

J := jacobian([seq(CApred[j, 1], j = 1 .. 6)], [theta1, theta2]);

err := evalm(CAexp-CApred);

niters := 0;

theta := matrix(2, 1, [10, 1]);

dtheta := evalm(theta);

while 0.10e-3 < max(abs(dtheta[1, 1]/theta[1, 1]), abs(dtheta[2, 1]/theta[2, 1])) and niters < 100 do Jeval := eval(J, {theta1 = theta[1, 1], theta2 = theta[2, 1]}); JevalT := transpose(Jeval); dtheta := evalm(`&*`(`&*`(inverse(`&*`(JevalT, Jeval)), JevalT), eval(err, {theta1 = theta[1, 1], theta2 = theta[2, 1]}))); theta := evalm(theta+dtheta); niters := niters+1 end do


This code does work as it comes from the professor and was used to solve the same type of problem but with different data, but I figure there is some error involving the specific data used in this case. I can copy and paste the error if necessary, but it is quite long.


All times are GMT -8. The time now is 02:34 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73