## 30 Reputation

3 years, 331 days

## Check if there is a non-numerical entry ...

Maple

Hello Everyone,

I am currently in the process of building a user interface where a user can input a ply layup for a composite part which needs to be calculated. I want to forbid the use of non-numerical value in the matrix which represents my ply layup, before it gets sent to be calculated, but I am wondering how to check if my matrix has non-numerical values in it.

At best, it would not only check if the matrix has non-numerical entries, but also give me the indices where exactly that value is present. I have yet been unsuccessful trying to find a fitting command. Do you perhaps know something that might work.
For clairification, allowable entries are in a range of -90 to 90, so it should not look for the "-" in the matrix.

Best Regards,
Lennart

## Set Embedded Plot Component to Logarithm...

Maple

Hello Everyone,

So I am currently plotting some data within an embedded plot component using the following code:

SetProperty("DeterminantenRaumPlot1", value, dataplot(DetAnalysisNx2, DetAnalysisDeterm2));

Which is working just fine, DetAnalysisNx2 and DetAnalysisDeterm2 are single rows vectors with numbers in it.

However I need the plot to be in logarithmic mode for the vertical axis, but I do not know how to achieve this. I can set it manually, but when I save and reopen the document and re-do the calculation it turns back to linear vertical axis.

What kind of code segment am I missing? I have tried adding this like 'mode = log' but it is not working with dataplot. Maybe I need a different kind of plot? But then my Vectors will not work anymore, dataplot makes it so easy to use and the setting is available manually.

Any help would be fantastic!
Thanks and best regards,
Lennart

## Under-determined Equation System yields ...

Maple 2017

Hello Everyone,

I have an equation system which is under-determined and thus yields infinite solutions.
These usually come in the form of "_t1[1]" or similar variables. Mostly one, sometimes even two.
I am also working on a script for automated solving of a buckling problem and the solution yields of course these t-variables.
Everytime the code run, I get a different t-variable, which makes automation harder.

Please see attached code. (Of course simplified, not my actual code.)

It starts with a random matrix and a solution vector for the equation system.
The system is solved and its coefficients transfered to an equation.
However every time I hit "Enter" on the LinearSolve command, the name of the _t4[1] variable changes.

Is there a way to keep getting the same variable name? How do you work with this?

Best Regards,
Lennart

 (1)

 (2)

## Code Editor Syntax and Symbolic Solution...

Maple 2017

Hello Everyone,

I am currently trying to tidy up my worksheet and hide all of the script/code that I wrote in the Maple 2D-Math within the execution script of buttons etc.
Was going well so far until I started transferring code where I was using a lot of symbolic math (if I understood correctly)
There is one instance where I have a variable chi which equals x divided by a.
a being a number, e.g. 5000, while x is and remains a variable.
No problem in 2D-Math as the unknown x is dragged through all following equations.

Not so in the code editor, I think. Doing the calculation results not in x/5000, but in this:

It keeps getting worse because this term will be derived, assembled into a matrix, etc. where the expressions are getting ridiculous:

Without getting into the details of what my script should do, I believe this is a very general issue, not specific to my code.

Is the code editor / "Code when Used/Clicked" not capable of symbolic math? Oder is there some setting that could potentially help me?

Best Regards,
Lennart

## Encasing Script in "Proc() / End Proc" m...

Maple 2017

Hello Everyone,

Me Again... So I have been working do create a procedure, but I started the coding without encasing it in the proc() / end proc; brackets, thinking I could add it later.
What the script does is take parameters and create a matrix and determines the determinant of that matrix.
When I let the script run on its own, it is working perfectly, but when I activate the proc() / end proc; brackets it suddenly gives me a number of errors, telling me the matrix is not square or that the if-loop misses its 2nd argument.

I am kind of suspecting this happens because I take the variable "NumberPlies" from a Table that exists outside the proc(), but on the same work sheet, but I am not 100% sure.
I have uploaded the code, so one of you experts could perhaps have a look and tell me where I am wrong. Why is the script behaving differently on its own compared to when I call it as a procedure?

Any help would be fantastic!

Best Regards,
Lennart

Anzahl Lagen des Laminates (Ohne Mittellage, eine Seite der Symmetrie):

Lastfall-Definition:

 (1)

 (2)

 (3)