bliengme

70 Reputation

0 Badges

8 years, 184 days

MaplePrimes Activity


These are questions asked by bliengme

The round(x) statement rounds x to the nearest integer but if x has unirs it appears not to work. Known bug?

RoundUnits.mw
 

restart

a := 15; b := 5.3

c := (1/100)*a+b

5.450000000

(1)

c := round(c)

5

(2)

``

A := 15*Unit('cm'); B := 5.3*Unit('m')

C := A+B

15*Units:-Unit(cm)+5.3*Units:-Unit(m)

(3)

C := simplify(C)

5.450000000*Units:-Unit(m)

(4)

Cr := round(C)

round(5.450000000*Units:-Unit(m))

(5)

``


 

Download RoundUnits.mw

 

Please tell me where I go wrong

And I have not even tried lamda in nanometers

Since theata is small I repalce sin(theta) by theta because, with units, sin did not compute

Anyone know a good reference (book/website) explaing Maple units?

Many thanks


TelescopeUnits.mw

From the screenshot we see that Maple has correctly replaced a in the defintion of s. But it has not incorported v[B]. I was a SMath (free from internet) user and this was a simple operation.

Thanks for any advice.


SymbolicEval.mw

Q1: In place of three statments like >a:=3: b:=4; c:=5, I have found from an example in this forum that one can use >(a,b,c):=(3,4,5). And I find this useful in some applications. Anyone know what version of Maple introduced this? I can find not referneces in the Maple books I have

Q2: Maple someimes gives 'naked' decimals when I use Numeric formatting. Any way of avoiding this. I would  like 0.25 not .25

Many thanks


 

I am trying to plot y:=x^2+x-12 as a curve and as a series of point. It is just not working. Suggestions, please.

Digitalize.mw
 

restart

f := proc (x) options operator, arrow; x^2+x-12 end proc

n := 10

h := 5``

printf("\n    i        x       f (dec.form)    f (sci. notat.)\n"); printf("  ---------------------------------------------------\n"); for i from 0 to n do X[i] := i*h; Y[i] := f(X[i]); printf(" %5d  %9.4f  %13.9f  %17.10e\n", i, X[i], Y[i], Y[i]) end do


    i        x       f (dec.form)    f (sci. notat.)
  ---------------------------------------------------
     0     0.0000  -12.000000000  -1.2000000000e+01
     1     5.0000   18.000000000   1.8000000000e+01
     2    10.0000   98.000000000   9.8000000000e+01
     3    15.0000  228.000000000   2.2800000000e+02
     4    20.0000  408.000000000   4.0800000000e+02
     5    25.0000  638.000000000   6.3800000000e+02
     6    30.0000  918.000000000   9.1800000000e+02
     7    35.0000  1248.000000000   1.2480000000e+03
     8    40.0000  1628.000000000   1.6280000000e+03
     9    45.0000  2058.000000000   2.0580000000e+03
    10    50.0000  2538.000000000   2.5380000000e+03

 

``

plot1 := plot([X[k], Y[k]], k = 0 .. n, style = point, symbol = soliddiamond, symbolsize = 24, color = blue)

plot2 := plot(f(x), x = 0 .. 50)

with(plots)

display([plot1, plot2])

 

``


 

Download Digitalize.mw

 

1 2 3 4 5 Page 3 of 5