Abdoulaye

40 Reputation

2 Badges

4 years, 49 days

MaplePrimes Activity


These are replies submitted by Abdoulaye

@vv  Thank you

Thank you !   Yes it works for the previous example but not for this example ?

F:=piecewise(t>=0 and t<1, t^2, t>=1 and t<2, 1, t>=2 and t<3, 3-t);





Error, (in maximize) to be implemented


@tomleslie Thank you !   Yes it works for the previous example but not for this example ?

F:=piecewise(t>=0 and t<1, t^2, t>=1 and t<2, 1, t>=2 and t<3, 3-t);





Error, (in maximize) to be implemented




@Kitonum  Thank you, this is better. 

@Carl Love  Yes,  I think it works ! Thank you !

@Carl Love  Thank you. It works !

@Preben Alsholm Thanks it works !

@Preben Alsholm  Thanks it works !

@Preben Alsholm  Thank you but it does not work for my code because my interval is not fixed. I have a sequence  of

functions of dimension '' n '' . Let's called S. I also have a sequence of times  T of dimension '' n + 1 ''. I need to plot like this

for example:

 

Example

                  plot( S[1]  , t = T[1]..T[2] , color = red )   

                  plot( S[2]  , t = T[2]..T[3] , color = black ) 

                  plot( S[3]  , t = T[3]..T[4] , color = red )    
           

                  etc....

                 plot( S[n-1]  , t = T[n-1]..T[n] , color = red )   

                 plot( S[n]  , t = T[n]..T[n+1] , color = black)   

I already write this code but it does not work

 

 

 

Thanks Kitonum,  the code works. My question is now how to plotin two different colors the sequence of curves ?

Example:   solution[1]  --->  red
                   solution[2] ----> black
                   solution[3]-----> red
                   solution[4]----> black

                  etc....

                  solution[n-1]--> red
                  solution[n]----->black

Thanks for you help !
 

@Kitonum  Thank you for your answer but it  is not what I really need.  Below is an explanation of my code and

I need to plot(  Sol[i] , t = Time[i]..Time[i+1] ) for i = 1.. n  in the same graph.  The number of functions depend on  '' n ''.

Note that  functionA:= proc(x0, t0)  and functionB:=proc(x0,t0) are two different functions.

 

 

@Kitonum 

 

I tried to plot by :   plot ( seq( [ solution[ i ], t = Time[ i ]..Time[i+1] ] ),  i  = 1..n )  but it does not work

@Kitonum 

 

Thanks but here the dimension '' n  ''  is not fix (  n is a parameter ). For example if n=5, I have 5 functions that I need to plot in 5 intervals. '' n '' can be 2 , 3 ,  6 , 9 ,  20 , etc...

1 2 3 Page 3 of 3