Shroomy

10 Reputation

One Badge

6 years, 43 days

MaplePrimes Activity


These are questions asked by Shroomy

Hey guys im still quite new to maple so bear with me on this one. 

Im trying to make it so when i press a button an some mathcontainers are going though some if statements, and then printing out the answer.

 

Heres the code 

 

use DocumentTools in 

Do(indkomst = %MathContainer2);
Do(fradrag = %MathContainer4);

if indkomst <= 44000 then 
    
    Do(%MathContainer3 = 0.08*indkomst);

elif 44000 < 0.92*indkomst and indomst <= 44000+fradrag then
    
    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000));

elif 44000+fradrag < 0.92*indkomst and indkomst <= 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag));

elif 0.92*indkomst > 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag) + 0.15*(0.92*indkomst - 467300));
    
end if;

end use; 
 

It correctly chooses what statement to use, but it just cant determine if its true or false, how do i fix this?

Hello everyone, here i Denmark we are using comma as a separator for decimal numbers. I have looked in the forum and found that if i changed my region in windows settings, but it is Denmark. When i use number formatting it tells me the output will be with comma as a separator,  but the output comes out with period as the separator. Is there a way to change it manually ?

 

 

Hey everone, im trying to get 2 legends to apear on my plot im animateing. The problem here is that it just wont. Could you guys help me ?

Heres the code

c := x -> piecewise(0 <= x and x <= 450000, 0.37*x, 450000 < x, 0.37*x + 0.06*(x - 450000));
g := x -> piecewise(0 <= x and x <= 558000, 0.37*x, 558000 < x, 0.37*x + 0.12*(x - 558000));
A1 := plots:-animate(plot, [g(x), x = 0 .. skat, color = blue], frames = 20, skat = 0 .. 1000000);
A2 := plots:-animate(plot, [c(x), x = 0 .. skat, color = red], frames = 20, skat = 0 .. 1000000);
Do(%Plot2 = plots:-display([A1, A2], size = [1000, 700], gridlines = true, legend=["Line 1","Line 2"],legendstyle=[font=[Lucida, roman, 14], location=bottom]));
SetProperty("Plot2", ':-play', true, ':-refresh' = true);

Page 1 of 1