scumath

295 Reputation

7 Badges

16 years, 33 days

MaplePrimes Activity


These are replies submitted by scumath

I agree with you. Maplesoft should make improvement on axes thickness.

Thanks again for your help.

Thanks again for your help.

Thanks for reminding me of the checking. But I don't worry about that since in my program n is always less than 360.

I have included your code in my Maple program for plotting some graphs and it works quite well and greatly improves the efficiency of the program. Thank you.

By the way do you know how to use Maple to check if two integer are relatively prime?
(http://en.wikipedia.org/wiki/Coprime)

Thanks for reminding me of the checking. But I don't worry about that since in my program n is always less than 360.

I have included your code in my Maple program for plotting some graphs and it works quite well and greatly improves the efficiency of the program. Thank you.

By the way do you know how to use Maple to check if two integer are relatively prime?
(http://en.wikipedia.org/wiki/Coprime)

Wonderful programs.  The two programs are exactly what I need. So my problem is completedly sovled.  Thank you for your help.

Wonderful programs.  The two programs are exactly what I need. So my problem is completedly sovled.  Thank you for your help.

Thanks for your program. I think this is almost the program I need. But I want the program ends immediately once the first n such that mod(n*m,355)=0 is found for a fixed integer m (say m=45). And I need to rename this n with another letter, K (K:=n) , which will be used in other part of my program.

So I tried to modify your code like the following (355 is replaced by 360 for convenience), but it does not work anymore.

restart:
m:=45
for n from 1 to 360 do
 if modp(n*m,360)=0 then K:=n:  
 (How to end the program here?)
end if
end do:
K;

(with m=45, the result K is 8)

Please help me find out what is wrong. Thank you.



 

Thanks for your program. I think this is almost the program I need. But I want the program ends immediately once the first n such that mod(n*m,355)=0 is found for a fixed integer m (say m=45). And I need to rename this n with another letter, K (K:=n) , which will be used in other part of my program.

So I tried to modify your code like the following (355 is replaced by 360 for convenience), but it does not work anymore.

restart:
m:=45
for n from 1 to 360 do
 if modp(n*m,360)=0 then K:=n:  
 (How to end the program here?)
end if
end do:
K;

(with m=45, the result K is 8)

Please help me find out what is wrong. Thank you.



 

Thanks for your help. My problem is that I don't know the "if...else" structure. I don't know how to terminate the execution once the integer is found. 
I tried the code below but it does not work.

m:=199:
N:=355: for i from 1 to 355 do
if modp(i*m,355)=0 then n:=i:  
 (I need this n as an output and  end the program )
else i=i+1:
fi:
od:
n;     
   (I need the output integer)

Could you help me with the program? Thanks a lot.

Thanks for your help. My problem is that I don't know the "if...else" structure. I don't know how to terminate the execution once the integer is found. 
I tried the code below but it does not work.

m:=199:
N:=355: for i from 1 to 355 do
if modp(i*m,355)=0 then n:=i:  
 (I need this n as an output and  end the program )
else i=i+1:
fi:
od:
n;     
   (I need the output integer)

Could you help me with the program? Thanks a lot.

Thanks for your help. I prefer simpler programs using if... else.

Thanks for your help. I prefer simpler programs using if... else.

I have been using Maple in my calculus teaching for years. Maple can easily produce lots of graphics and animations of functions for my PPT courseware.

Thanks for your comments. But I couldn't follow the instruction. It is too complex for me. I hoped the Maple software itself can solve the problem I have, but I was wrong.

1 2 3 4 5 6 7 Page 2 of 7