bmartin

Dr. Blake Martin

120 Reputation

6 Badges

6 years, 161 days
Maplesoft
Senior Developer

MaplePrimes Activity


These are answers submitted by bmartin

Hello,

Even though the Prismatic joints are connected in a similar fashion, sometimes only a subset of variables will be reported in the "all model variables" section. This has to do with what variables are required to perform the simulation and report probed results. Said another way a probe on a Prismatic joint might cause more variables to be listed than a Prismatic joint without a probe. This is not unique to Prismatic joints but occurs for all components.

Unfortunately, there is no documentation regarding this. However by adding sensors and probes in your model you can know exactly which quantity is being measured and use that when reviewing the simulation results.

Hello,

When a component is expecting an array of inputs or outputs, you can assign the connections by highlighting the connection lines and making the selection in the Properties tab on the right-hand side. In the example below the And Gate takes 2 inputs so I directly connect 2 Pulse components.

If I select the 2 connection lines I can specify which Pulse component should be connected to the first input of the And Gate and which should be connected to the second input of the And Gate.

 

The same approach is used for other libraries as well, not just the Digital library!

-Blake

Hello and thanks for your question. From the snippet of code you've shared it seems that the 'DocumentTools' package is not loaded. Instead of calling 'SetProperty' try writing 'DocumentTools:-SetProperty'. Alternatively, you can look into using the 'with' procedure or the 'uses' option for procedures (see the help page for 'procedure') if you do not wish to have such verbose code within 'ResetCombobox'.

Here's how I updated the last line to obtain different colors:

implicitplot3d([f, g, Op], x = 0 .. 2, z = 0 .. 2, w = 0 .. 2, style = surface, color = ["red", "blue", "green"], grid = [50, 50, 50])

I used style = surface to remove all the black "wires" that get added to the plot and I find it looks better that way. Also note that I changed the curly brackets to square brackets in [f, g, Op] and use square brackets when defining the colors.

-Blake
 

Hello,

Using 'kernelopts' you can find the path to Maple's data directory on your system, and then go to the datasets directory. You can also list the files in the datasets directory using FileTools.

kernelopts(datadir);
FileTools:-ListDirectory(FileTools:-JoinPath([kernelopts(datadir), "datasets"]));

 

-Blake

Hello,

Instead of 'eval' you can use 'evalf', which will evaluate using floating-point arithmetic.

Hello,

Maple does have the capabilities to perform parallel processing. Here is a link to the Parallel Programming chapter in the Maple Programming Guide:

https://www.maplesoft.com/support/help/maple/view.aspx?path=ProgrammingGuide/Chapter15

Hello,

First, you should know that using capital 'I' in Maple is interpreted as imaginary. You need to either define I to be local (as below) or use a different variable.

local I;
Ke := Matrix(4, 4, {(1, 1) = (12*I)*E/l^3, (1, 2) = (6*I)*E/l^2, (1, 3) = -(12*I)*E/l^3, (1, 4) = (6*I)*E/l^2, (2, 1) = (6*I)*E/l^2, (2, 2) = (4*I)*E/l, (2, 3) = -(6*I)*E/l^2, (2, 4) = (2*I)*E/l, (3, 1) = -(12*I)*E/l^3, (3, 2) = -(6*I)*E/l^2, (3, 3) = (12*I)*E/l^3, (3, 4) = -(6*I)*E/l^2, (4, 1) = (6*I)*E/l^2, (4, 2) = (2*I)*E/l, (4, 3) = -(6*I)*E/l^2, (4, 4) = (4*I)*E/l});

 

I'm not sure how to get it exactly in the form you want, is there any particular reason why? If you are just trying to check the entries in the matrix you can do the following to your matrix Ke

Ke/(E*I/l^3)

 

Hello,

Boundary value problems need to be defined between two points, say x=a and x=b. In the code you provided there are a total of 4 points used in the conditions, x=0, 0.001, 0.1, and -0.6. If you only had two points x=a and x=b used in the 6 conditions then you should get a solution.

Hello,

If you know the value for each of the unknowns you can use the 'subs' command.

sol := -c^2*(d^2*a*sin(k1*(-c*t+x))/dx^2+2*d*a*k1*cos(k1*(-c*t+x))/dx);
subs({a=A, c=C, ...}, sol);

Above, A and C would be values you want to substitute into your solution and you would do this for each variable. 

Hello,

You can use the 'dsolve' command and additionally you can see an overview of the DEtools package by using the command '?DEtools' in Maple (or by searching DEtools in the Maple help). You can also search for "differential equations" in the Maple Help and it will bring you to a worksheet with links to examples.

Hope this helps!

 

Hello,

Not sure if you still are looking for an answer to this but thought I'd post anyways.

Changing the colour of text can be done from the toolbar. See below where I've emphasized the text colour option in a green square.

Unfortunately, I don't know of any way to change the background colour in Maple.

- Blake Martin

Hello,

Something that I like to do when using the 'rand' command is to reset the seed using the 'randomize' command. This will prevent you from opening your worksheet and getting duplicate results from the last time you opened the worksheet. This can be done just before calling the 'rand' command, i.e. the code would be:

restart;
randomize();
Dice1 := rand(1..6);

...

Hello,

You can just use the 'solve' command to get a solution. i.e. 

solve({(T[1]-T[0])/(10000-T[1]+T[0]) = -2.000000000, (T[2]-T[0])/(20000-T[2]+T[0]) = 0, (T[3]-T[0])/(50000-T[3]+T[0]) = 50, .1*T[0]+.3*T[1]+.55*T[2]+0.5e-1*T[3]-5000 = 0}, {T[0], T[1], T[2], T[3]});

will return a solution to the problem.

Hello,

The error you're receiving is telling you that the initial point in the optimization violates the contraints. For example m2 > sigma2 is violated since m2 = sigma2 = 0.9. Then the program tries to find an initial feasible point but seems to fail to find one.

What if you tried starting with an initial point that is known to be feasible? Would you still run into this issue?

1 2 Page 1 of 2