Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Write a Maple code that performs the Gaussian elimination for an nxn matrix, converting it to an upper triangular matrix. 

(Hint: you will need to use three for .. do loops.)

I want to make the model which moves along the specific direction (translational), So I used the "prismatic joint" to give the direction that I want to enforce. However, "Prismatic joint" only offers the direction along the "X", "Y", and "Z" axes though I want to give other direction.

 

Is there any way to give the specific direction (vector) to make my model move in that way ?

hello

i have some problem when iuse the digital libray with the delay components:

i have this error: delay variable not found in dependent variable list, [`Main.TransportDelay1.x`(T)]

it seems that the delay function in the modelica language is not well treated in MapleSim . At this level:

 

equation
    y = if 0 < delayTime then if delayTime <= time then x_delayed else y0 else pre(x);
    x_delayed = integer(delay(x, delayTime));
end Modelica.Electrical.Digital.Delay.TransportDelay;

 

Thank you for your help.

 

 

Hi

I'm trying to use the command: DocumentTools[Retrieve](path,label), but i recieve the message "unable to retrieve label reference" no mather what i do. When i use the GUI: Insert - reference and get the value it works fine, but in that way I can't assign the value to a variable in the document.

here is an example:

The document i want to retrieve a value from:

restart;

a := 5;

#a gets the label (1)

 

The document i want to retrieve the value to:

restart;
with(DocumentTools);

path := FileTools:-JoinPath(["test.mw"], base = worksheetdir); = "C:\Users\Nicolai\CloudStation\Nicolai\Skole stof\Sem 7\test.mw"

 

Retrieve(path, "());
Retrieve(path, "(1)");
Retrieve(path, "a");

#None of the above works

 

Is it even possible to do such thing?

with best regards

Nicolai

Hi,

I tried to use the Finance package and got:

with(Finance):
Warning, some commands in the Finance package may not work on this platform
Y := ItoProcess(1.0, mu, sigma, x, t);

Error, (in Finance:-ItoProcess) external linking: error loading external library finance.dll: The specified module could not be found.

 

Is it me or my pc that is causing this?

Thank you.

Murray

Hi:

I would like to slightly modify the "Explore" command -- I find it extremely useful, but the layout often doesn't work well for me (my typical use case is say 12 plots with ~10 parameters that vary). The problem is that the default alignment the columns of the table that contains a matrix of plots is "Center" and my plots don't fit on the screen properly (no matter how I play with sizes, placement, etc) and I would like it to be "Left" aligned --- aligning things manually (via right click) after the explore command is executed is possible, but painful, given that I often change my code.

... bottom line is that I would like to be able to re-define the "Explore" command.

I tried doing so by first calling:
showstat(Explore);

... then removing all the numbers, renaming the proc to sat MyExplore, declaring it (i.e. so maple understands it) and for now using that instead of the old Explore in my program (with no actual code changes for now). The problem is that I get the following error:

Error, (in DocumentTools:-Layout:-Table) number of Column arguments, 3, exceeds total column span, 1, computed from Rows' Cells

I think, somehow maybe showstat is not showing the full thing? or maybe it is part of a more complicated module? or maybe by removing the numbers the formatting got screwed up (i was careful here)?

So my question:

How would I define my own function "MyExplore" that (for now) contains exactly the same code and functionality as the built-in "Explore"?

thanks!

I want to translate my maple code with matrice multiplication  to C code. But the command  "Multiply" cannot be translated. So I want to edit the function translation by myself. I use "AddFunction" command to create a new function  "Multiply" and want to specify its corresponding C code.

 


f := proc ()
local x,y;
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a,b;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

 

But when I run it, the "Multiply" function cannot be translated.  The result is:

 

Warning, type signature [CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions()), CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions())] for function Multiply is not recognized
void f (void)
{
  int x[2][2];
  int y[2][2];
  x[0][0] = 1;
  x[0][1] = 2;
  x[1][0] = 3;
  x[1][1] = 4;
  y[0][0] = 1;
  y[0][1] = 3;
  y[1][0] = 4;
  y[1][1] = 2;
  Multiply(x, y);
  ;
}

I don't know why "Multiply(x,y)" cannot be translated.

If I put two "Multiply(x, y)" in the procedure, like this:


f := proc ()
local x,y;

Multiply(x, y);
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

THe result is:

Warning, cannot resolve types, reassigning x's type
Warning, cannot resolve types, reassigning y's type
Error, (in CodeGeneration:-IssueError) type 'Matrix' cannot be translated to target language

I don't know why type 'Matrix' cannot be translated.

 

 

Maplesim 7.0(1) installer looks for Maple 18 installation.  Will Maplesim work with Maple 2015?

If not, what is the expected date of making both products compatible?

Regards,

G

integral.mw

 

Hi all, I want the best for you.

I really have confused with this bad integral (HeunB)which I've got it 2 weeks ago from a solution by Maple 17. I should solve this one to solve the derivative of this too.

 

Help me please, I attached the attribute file.

Regards.

Hi all,

 

It's been a while since I have used Maple. To be honest I haven't used it for over six years.

 

I am trying to solve simple differential equations, however I have many issues.

 

I am trying to simulate what author of this paper did 06421188.pdf

 

My file looks like this (Pendulum.mw)

 

Can someone help me to simulate this system? I simply can't remember how to do it.

 

Cheers,

Bart

Attached is a photo with the code I am working for.  

On the top is practice code with a simpler ODE to help with trouble shooting, on the bottom is the ODE I am working with.

I was hoping to gain insight about the _z1 symbol in the solution, I haven't been able to find much help on other threads.  I would like to know how I can go about working with it - if it is something on my end or if it is the nature of the equation I am working with.

 

Thank you for any help,

Josh

I have a nice procedure that is as follows, that explores the behaviour of a mapping in R^2.

InversePoincare := proc (v) options operator, arrow; v*Norm(v, 2)/(1-Norm(v, 2)^2) end proc

SphereVectorPlot := proc (T, radius, radiusIncrements, angleIncrements, lengthParam)
local listOfPairs;
listOfPairs := {seq(seq([[radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements], T(InversePoincare(`<,>`(radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements)))-InversePoincare(`<,>`(radius*r*cos(2*angle*Pi/angleIncrements)/radiusIncrements, radius*r*sin(2*angle*Pi/angleIncrements)/radiusIncrements))], r = 0 .. radiusIncrements), angle = 0 .. angleIncrements)};
if lengthParam = false then
 return arrow(listOfPairs, scaling = constrained, shape = arrow)
else
 return arrow(listOfPairs, length = lengthParam, scaling = constrained, shape = arrow)
end if
end proc

Essentially, we plot vectors v at location u. Since the vectors v in general vary wildly in magnitude, I would like to visualize the magnitude change by using color and/or transparency, preferably the latter. Is it possible to do so, and if so, how?

Hello,

I have modeled a slidercrank with absolute coordinates.

I have a slight problem when I want to mesure the Euler angles with Euler angle sensors.

In fact, the angle of the crank around the z axis (gamma1) always stay betwen -pi and pi. I would have like to see the value of my angle always increases with the evolution of the time since I impose a constant torque on the crank.

How can I do to observe the Euler angles of a body (parameterized with absolute coordinates) without any limit between [-pi,pi]?

Thank you for your help.

PS: I insert my model attached

slidercrank_3D_AC.msim

Hello everyone. I am trying to make a position time graph of a charged particle in an gravitational and electric field. This is just for an application of Maple to Lagrangian mechanics. I have set up my Lagrangian, did the Euler-Lagrange equation, and solved the differential equation. When I go to plot it, just the axes show up and I dont have a line. I have followed other examples of Lagrangian mechanics in Maple and its still not working. Here is the code for the odeplot:

Eq7:=dsolve({Eq6,initial},{q(t)},numeric,output=listprocedure)

odeplot(Eq7,t=0..10)

Eq6 is the Euler-Lagrange equation for my system, initial is the initial values, and q(t) is the position of the particle.

Any suggestions will help.

 

 

First 205 206 207 208 209 210 211 Last Page 207 of 334