protrader

409 Reputation

7 Badges

17 years, 158 days

MaplePrimes Activity


These are replies submitted by protrader

@herclau There is no way I can thank you enough, I appreciate your help a thousand times!

@herclau There is no way I can thank you enough, I appreciate your help a thousand times!

@herclau Yes! It works perfectly with integer format but my x series are date+time which produces float format for numbers when importing data into Maple and I cannot get the same results. This procedure has not been coded for any other format than integers? [See the attached data]  Extremes3.zip

@herclau Yes! It works perfectly with integer format but my x series are date+time which produces float format for numbers when importing data into Maple and I cannot get the same results. This procedure has not been coded for any other format than integers? [See the attached data]  Extremes3.zip

BTW I am using Maple 13 and I could not find what "peakdet" is however it works with maple 13 too.

BTW I am using Maple 13 and I could not find what "peakdet" is however it works with maple 13 too.

This is what I wanted, however I modified it a bit:

restart:
f := proc(A::uneval, B::uneval)
global a,b,C:
a := convert(A,string);
b := convert(B,string);
C:=A+B;
end proc:
A1 := [1,2]:
B1 := [3,4]:
f(A1,B1):
a;
b;
C;



"A1"
"B1"
[4, 6]
coco:=5:
MyNum:=2:
f(MyNum,coco):
a;
b;
C;
"MyNum"
"coco"
7

 

This is what I wanted, however I modified it a bit:

restart:
f := proc(A::uneval, B::uneval)
global a,b,C:
a := convert(A,string);
b := convert(B,string);
C:=A+B;
end proc:
A1 := [1,2]:
B1 := [3,4]:
f(A1,B1):
a;
b;
C;



"A1"
"B1"
[4, 6]
coco:=5:
MyNum:=2:
f(MyNum,coco):
a;
b;
C;
"MyNum"
"coco"
7

 

@Markiyan Hirnyk 

I have defined a procedure that gets 2 lists however I am using this procedure in a loop and the name of the entries will be different each time. Let's say the name of the lists for the first time is "MyList" and "LL" and for the second time is "L2" and "coco" and so on.

so the procedure format will be f(MyList, LL) for the first, f(L2, coco) for the second and so on.

I want to save the name of the entry lists to this procedure as a string so for the first iteration I should save the names under a and b which will be:

 

a="MyList" b="LL"

 

for the 2nd  a="L2" and "coco"

 

the format of the procedure that I have defined is f(A,B),I tried convert(A,string) but it converts the entire value of A list to string not its symbol. How can I do that?

 

 

 

strip works for strings, so we need to convert the resultant string to a number. I could not find some function for that. Do you know how to do that?

 

 

strip works for strings, so we need to convert the resultant string to a number. I could not find some function for that. Do you know how to do that?

 

 

but the problem is still on the table, we need to determine the precision because it rounds the numbers. So the number of digits after decimal point must be determined (as precision).

 

interface(displayprecision=1):
evalf(3/2);
evalf(3.02);
evalf(3.76);
                                 1.500000000
                                    3.02
                                    3.76
 

 

 

but the problem is still on the table, we need to determine the precision because it rounds the numbers. So the number of digits after decimal point must be determined (as precision).

 

interface(displayprecision=1):
evalf(3/2);
evalf(3.02);
evalf(3.76);
                                 1.500000000
                                    3.02
                                    3.76
 

 

 

yes, it works, that meets my needs, thanks a lor Robert, you are the man!

1 2 3 4 Page 1 of 4