Thomas Dean

322 Reputation

10 Badges

19 years, 122 days

MaplePrimes Activity


These are answers submitted by Thomas Dean

restart:
with(Units[Standard]):
with(Units):
UsingSystem():

## Note:  Here, you are assigning a value to q.
q := -k*(T2-T1)/t;
S := {T1 = 550*Unit('K'), T2 = 50*Unit(Unit('K')), k = 19.1*Unit('W')/(Unit('m')*Unit('K')), t = 2*Unit('cm')};
eval(q, S);

## Note:  At this point, q still has the value assigned above.
##        Maple simplifies the input and the result is t = t!
t := -k*(T2-T1)/q;

S := {T1 = 550*Unit('K'), T2 = 50*Unit(Unit('K')), k = 19.1*Unit('W')/(Unit('m')*Unit('K')), q = 477.5*Unit('kW'/'m'^2)};
eval(t, S);

## Note:  If you avoid using variables that already have values
##        the result is different.  I used zz rather than q to make
##        the name more obvoius.
##        use variable names that make sense in the application.

t := -k*(T2-T1)/zz;

S := {T1 = 550*Unit('K'), T2 = 50*Unit(Unit('K')), k = 19.1*Unit('W')/(Unit('m')*Unit('K')), zz = 477.5*Unit('kW'/'m'^2)};
eval(t, S);

## the same applies to the remainder of your code.

q := 'q';  ## clear the previous value assigned to q.

Tom Dean

Use a function and map

f:=(x)->convert(x,parfrac);


map(f,M);

The correct syntax depends on where the file is actually located.  Most likely, if it is a file you created, it will be in some form like

read "/home/<username>/Desktop/code.txt"

Where <username> is the login name of the user.

To get some idea of the equation form, try:

restart;
with(geom3d);
eq1 := {4*x+3*y+z = 0, x+y-z-15 = 0};
eq2 := {9*x+y-3*z-5 = 0, 12*x+5*y+7*z-13 = 0};
plane(P1, eq1[1], [x, y, z]);
plane(P2, eq1[2], [x, y, z]);
plane(P3, eq2[1], [x, y, z]);
plane(P4, eq2[2], [x, y, z]);
intersection(L1, P1, P2);
intersection(L2, P3, P4);
detail(L1);
detail(L2);

1 2 Page 2 of 2