gkokovidis

2335 Reputation

13 Badges

20 years, 6 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

The closest example from the Maplesoft website is this:

Frequency Domain System Identification

I think what you are looking for is the Maple equivalent of the Matlab command invfreqs.

An example that fits what you are trying to do, if I understand your question, is something like this.  There is a file that has been exported from another program.  That program can create a bode plot natively, but all you have is the data.  Using the data, you would like to "estimate" the transfer function.  Correct?

Regards,

Georgios

See article below.

https://www.computerhope.com/findstr.htm#:~:text=For%20example%2C%20'FINDSTR%20%22hello,Wildcard%3A%20any%20character.

I tried this under Windows 10.  I added a line "the_coeffs", to two separate files, one .mw, and one .mws.  findstr found both of the files containing the text I was looking for.  My search query below.  The files were in my C:\temp\Maple directory as a test.

C:\temp\Maple>findstr /s "the_coeffs" *.mw*


EquationFromDataFit.mw:<Input><Text-field prompt="&gt; " style="Maple Input" layout="Normal">the_coeffs := solve(eqns);</Text-field>
EquationFromDataFit.mw:<Input><Text-field prompt="&gt; " style="Maple Input" layout="Normal">y = eval(f(x), the_coeffs);</Text-field>
printf.mws:{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "the_coeffs := solve(eqns);" }

It returned the first filename twice, as there were two instances of the word in it.  This was returned in the command window.  It can be piped to a file for further processing.

Regards,

Georgios

 

See this link.  It should do what you are looking for.

//Georgios

See a reply to a similar question here.

For part 2) of your question, if you scroll all the way to the bottom of the help page that you have shown, there is an arrow with

 Download Help Document.  Click it, and the whole help page will download and can be opened in Maple to execute.

Not clear what you are looking for without an example.  

restart:
for i to 10 do x[i]:=i end do:
xx:=convert(x,list);

add(xx);
 

Try cutting and pasting the above in your worksheet to see if it similar to what you are trying to do.

i in Maple is the Capital Letter I.  Not exactly clear what you are after.

I.mw

restart:
a:=8*x+3*I;
                         a := 8 x + 3 I

b:=5*x-I;
                          b := 5 x - I

eqn:=a/b;
                               8 x + 3 I
                        eqn := ---------
                                5 x - I 

solve(eqn,x);
                               3  
                             - - I
                               8  

For part a) of your question, increase Digits at the beginning of your worksheet.  This looks like a roundoff error issue.

restart: Digits:=20:

Like the attached, for examle, or something else?

Download ellipse.mw

Look at the help file for warnlevel.

?interface(warnlevel)

You can modify it to suppress warnings, but be careful with its use.

Regards,

Georgios

The command pointplot is part of the plots package.  You can load the plots package at the beginning of your worksheet.

with(plots):

Then rerun everything and you will be fine.  You can also use the long form of the command without loading the whole package.

plots:-pointplot(pts, view = [0 .. 30, 0 .. 700], title = "Biomass")

Regards,

Georgios

If you are entering code in the worksheet, then the for loop needs a Cntr+Enter to go to the next line.  This can be avoided if you use an external text editor (the code below was done in Notepad++).

restart:
som :=0:                    
for i from 1 by 1 to 10 do
som := som + i;                
od;

If you cut and paste the above in a new worksheet, it will exectue wihtout any issues.  Notice that there is a colon after the 0, in som:=0.  You can use a semicolon as well if you want the 0 term to show during exectuion of the loop.

Download loop.mw

You are working with floating point approximations.  Executing your worksheet with a higher level of precision,

(Digits by default is 10), yields 1 solution for all 3 cases.  
 

Download number_of_solutions.mw

Try increasing the value of Digits incrementally until all of your functions are evaluated. 

100 seems to work for all of them.  You can the numeric formatting afterwards to limit the number

of decimal places afterwards if it is important from a display standpoint.

Regards,

Georgios

Can you upload your worksheet that causes this error.  Use the Green Up-arrow  in the menu.  Maple version?  

Try opening the attached and run it.
 

Download Intsin(x).mw

Regards,

Georgios

 

1 2 3 4 5 6 7 Last Page 1 of 75