Carla Conde

35 Reputation

One Badge

5 years, 326 days

MaplePrimes Activity

These are questions asked by Carla Conde

Dear, could you please help me with the following doubt?

If I have 2 procedures, 

P1:= proc() 


end proc;

P2:= proc()



end proc;

and within P2 I invoke and run P1, do I have to declare P1 as a local/global variable when declaring variables in P2, or it is not necessary? 

Many thanks for your help. 




Could you please help me with the following problem? 

I have a list, say, L:= [2,3,4,5]; 

and I need to find the position of several of its elements. However, when a apply the BinarySearch command I get a wrong return. For example, element >= 5:  BinarySearch(L, 5, `>=`);  

Maple returns 0

Element = 4: BinarySearch(L, 4, `=`); 

Maple returns 0

Element < 3: BinarySearch(L, 3, `<`); 

Maple returns 2. 

Obviusly, I'm doing something wrong. Could you please tell me what it is?

Many thanks for your help.



Please, may I ask your help with the following problem? 

I have to print something like this: 

Days 4,5,6 is closed. 

4,5,6 is the content of a list.  I enter: 


printf("Days %a is closed\n", d[]);

but Maple returns:

Days 4 is closed

Of course, if I enter  printf("Days %a, %a, %a is closed\n", d[]);

I get the correct result: Days 4,5,6 is closed. 

However, the numer of elements the list will have vary from case to case and according to the procedure I'm running so I cannot enter the command with the exact number of %a. How could I overcome this problem?

Many thanks for your help. 



Please, I would like to ask your help with the following situation: 

If we have to solve in Maple a linear system like A.x =b, we employ the command Linsolve. However, how can I solve a system like x.A=b? 

The only method I know is to compute x=b.A-1. Is this an efficient method or there is a better one you recommend? 

Many thanks for your help.  

Dear, I would like to kindly request your help with the following problem I have: 

L:= [0, 3,0,7];

for i from 1 to 4 do
if L[i] > 0 then 
x[i]:= [L[i]/2]
end if;
end do;

I need to write the elements x[i] as a list, however if I type x[i];  Maple just returns the last value of L[i]/2, namely 7/2. I do not know how to obtain the full list [3/2, 7/2]. What am I doing wrongly?

Many thanks in advance for your kind help. 

1 2 Page 1 of 2