gkokovidis

2165 Reputation

11 Badges

16 years, 99 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are replies submitted by gkokovidis

@mmcdara 

I reran the original code, and the fix, or what really made it work, was the inclusion of the semicolons after the k, and k1 commands.

Error, missing operator or `;`  

I chaged the curly brackets out of habit, as I do not use them in any of the display commands that I have used in the past.  

Regards,

Georgios

@Thomas Jensen10  Your worksheet cannot be opened in Maple, as there are no useful Maple commands in it.  If you open it in a text editor (like Notepad++), you will see what I mean.  It looked like an infinite number of little square symbols. 

Sometimes, on my Windows platform, the same worksheet is backed up with a ".bak", extension.

Try doing a search in your directory for all instances of you filename without any extensions to see if there is something there that might be recoverable.

Regards,

Georgios

Adding to what you already have in place:

A:=Array(map(parse, StringTools:-Explode(convert(a, string))));

Regards,

Georgios

I downloaded your worksheet, and executed in my version of Maple, 2019.2, Windows 7 64 bit.  Ran fine.  The Explore pop-up came up, I clicked Explore and then I saw all the graphs.  Try adding a restart command at the beginning of your worksheet.

Regards,

Georgios

@Joe Riel   Thank you Joe.  I was looking for that in the help page, and overlooked this section:  

 

dsolveargs = list( equation )

Regards,

Georgios

@ogunmiloro Haven't looked into the second error message, but the first one, is due to a multiplicatioin sign missing from your equation.  I would suggest you stop using 2D input mode and switch to 1D.

ODE := [x(0) = -a, diff(x(t), t) = z*x(t) - b + 1] will fix the dsolve error.

Regards,

Georgios

@Earl The link here has a free Spice simulator that you can use with Schematics or a Netlist.  There are hundreds of examples for an RLC if you search for LTspice and RLC on the web.  If you need more help, then ask again, with specific details.

Regards,

Georgios

@Hnx What I see in your worksheet, and what I see in the worksheet provided by Preben are the same, but here is an issue with what you are doing, besides using 2D input mode.

 

You are trying to write code inline using the if then statement, and using the Enter key to move to the next line.  This is a problem.  Two easy ways to get around this.  Write your code in an external editor (like Notepad++), which is what I did, or use Shift+Enter key to advance to the next line, when writing code using if statements, else, for loops, ...  

See your worksheet in the attachment, where the code that Preben provided is in one region without any line breaks.

 

//Georgios
 

restart

r1 := 4; h := -4; sin_phi := h/r1

-1

(1)

"if sin_phi<=-1 then   h:=-0.99*r1:"

Error, unterminated 'if' statement

"if sin_phi<=-1 then   h:=-0.99*r1:"

 

"else  end if;"

Error, unable to parse

"else  end if;"

 

"end if:"

Error, unable to parse

"end if:"

 

NULL

restart

r1 := 4; h := -4; sin_phi := h/r1

-1

(2)

if sin_phi <= -1 then h := -.99*r1; print('h*wurde*redimensioniert'); print(h) else  end if

-3.96

(3)

The code below is the same as your code above, except that I cut and paste each line individually into an text editor, and then I cut and paste the whole thing into Maple below.  As I mention in my reply, you can also do this in Maple line by line, but with the if statement, to advance to the next line, you have to use Shift+Enter.  Give it a try and let us know if this works for you.

restart; r1 := 4; h := -4; sin_phi := h/r1; if sin_phi <= -1 then h := -.99*r1; print('h*wurde*redimensioniert'); print(h) else  end if

-3.96

(4)

 

NULL


 

Download Trouble_with_if_statement_2020-06-10_GKEdits.mw

 

 

@Hnx 

You can print sol_num, to see the output of the procedure.  Not clear if that will help you.

See help page for ?dsolve/numeric/Events for adding a break condition.

Regards,

Georgios

If this is a real circuit, then your system of equations is solvable.  Here is an example using dummy voltages and resistors.  The op amp in the netlist used by the Syrup package is ideal, as is the one in the circuit example used in LTspice.

Syrup can be downloaded from the Application Center.

The attached has 3 voltages V_0 to V_2, but you can easily add as many as you like for your particular application.  Example below with and without values.

Site will not allow me to include the worksheet inline.  See link below.

Download MaplePrimesSynth.mw

Regards,

Georgios

 

@Joe Riel Thank you.  I should have figured this out on my own, but I was looking at a bigger problem, and was using the link example as a starting point.  I apppreciate your response.

Regards,

Georgios

@adel-00 Show the original problem, and how you solved it with your Matlab code (post both), so we have an idea how we would approach it in Maple, and determine the differences between how you obtained the plot in the attached pdf file, vs. what you are showing with your Maple code.

//Georgios

Thank you for the worksheet and the images, Samir.  Squinting has the safe effect as moving further way (if you're lazy like I am and can't be bothered with getting off of the chair to step back and view the image from afar).

Regards,

Georgios Kokovidis

@Vasanth kumar Navigate to the link, and scroll to the bottom.  Open the file 

Execute in your Maple session.

 

@Elisha All 3 are displayed, but two of them are pretty close to each other, and one covers the other one, so it gives you the impression that only two are visible.

I am away from my Maple installation at the moment.  Look at the help file for the plot command ?plot, and see if you can alter the thickness of the lines to convince yourself that all 3 lines are present.

 

Regards,

Georgios

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