gkokovidis

2158 Reputation

11 Badges

16 years, 18 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are replies submitted by gkokovidis

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

@Elisha There is a space after your command with(plots).  Your worksheet start like this:  with (plots), but it should be with(plots), just like I posted. 

Because you are using 2D input, Maple sees the space as a multiplication sign.  I recommend using 1D input to avoid these types of problems.

Open my original worksheet, and modify that, and re-execute, using the 3 !!! marks at the top of the Maple toolbar.

@Elisha As I mentioned, the data file is on My desktop, not yours.  You have to modify the path, so the file can be found.  If it does not exit, then create it.  I copied your data from your post, and pasted it into a text editor, and saved it.  

The other option you have is to open the worksheet that I uploaded, and save it.  The you can cut the data from the worksheet, and use it as is.  See below.  

restart:with(plots):

Data := [[.1, 0.769540597e-1, .1477783335, .1393069312, 0.763361154e-1, .1477867626, .1393072151, 0.763361266e-1, .1477867830, .1393071934], [.3, .1093424148, .1120401102, .1509302274, .1072278404, .1121142033, .1509369166, .1072278479, .1121142168, .1509369024], [.5, .1392030568, 0.853083077e-1, .1558066181, .1353291378, 0.855066806e-1, .1558355785, .1353291558, 0.8550671332e-1, .1558355439], [.7, .1662374563, 0.652194693e-1, .1562235596, .1604342222, 0.655908735e-1, .1562974878, .1604342352, 0.6559089617e-1, .1562974637], [.9, .1903821623, 0.500537619e-1, .1537887672, .1825594352, 0.506356391e-1, .1539346707, .1825594528, 0.5063567192e-1, .1539346352], [1.1, .2117168860, 0.385555127e-1, .1496220815, .2018541863, 0.393727175e-1, .1498707561, .2018542024, 0.3937274753e-1, .1498707234], [1.3, .2303874000, 0.298096396e-1, .1444864012, .2185409755, 0.308687065e-1, .1448804021, .2185409880, 0.3086872986e-1, .1448803765], [1.5, .2465077820, 0.231661161e-1, .1388614678, .2328759081, 0.244336214e-1, .1394893808, .2328759200, 0.2443364533e-1, .1394893543]];

[[.1, 0.769540597e-1, .1477783335, .1393069312, 0.763361154e-1, .1477867626, .1393072151, 0.763361266e-1, .1477867830, .1393071934], [.3, .1093424148, .1120401102, .1509302274, .1072278404, .1121142033, .1509369166, .1072278479, .1121142168, .1509369024], [.5, .1392030568, 0.853083077e-1, .1558066181, .1353291378, 0.855066806e-1, .1558355785, .1353291558, 0.8550671332e-1, .1558355439], [.7, .1662374563, 0.652194693e-1, .1562235596, .1604342222, 0.655908735e-1, .1562974878, .1604342352, 0.6559089617e-1, .1562974637], [.9, .1903821623, 0.500537619e-1, .1537887672, .1825594352, 0.506356391e-1, .1539346707, .1825594528, 0.5063567192e-1, .1539346352], [1.1, .2117168860, 0.385555127e-1, .1496220815, .2018541863, 0.393727175e-1, .1498707561, .2018542024, 0.3937274753e-1, .1498707234], [1.3, .2303874000, 0.298096396e-1, .1444864012, .2185409755, 0.308687065e-1, .1448804021, .2185409880, 0.3086872986e-1, .1448803765], [1.5, .2465077820, 0.231661161e-1, .1388614678, .2328759081, 0.244336214e-1, .1394893808, .2328759200, 0.2443364533e-1, .1394893543]]

(1)

x:=[seq(Data[i,1],i=1..nops(Data))];

[.1, .3, .5, .7, .9, 1.1, 1.3, 1.5]

(2)

y1:=[seq(Data[i,2],i=1..nops(Data))];

[0.769540597e-1, .1093424148, .1392030568, .1662374563, .1903821623, .2117168860, .2303874000, .2465077820]

(3)

y2:=[seq(Data[i,3],i=1..nops(Data))];

[.1477783335, .1120401102, 0.853083077e-1, 0.652194693e-1, 0.500537619e-1, 0.385555127e-1, 0.298096396e-1, 0.231661161e-1]

(4)

y3:=[seq(Data[i,4],i=1..nops(Data))];

[.1393069312, .1509302274, .1558066181, .1562235596, .1537887672, .1496220815, .1444864012, .1388614678]

(5)

p1:=plot(x,y1,color=red):

p2:=plot(x,y2,color=blue):

p3:=plot(x,y3,color=green):

display(p1,p2,p3,gridlines=true);

 

Download dataIO_Column2.mw

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