## Edit Array/Matrix directly via DataTable / Change ...

Hello Everyone,

I am fairly new with Maple, but I am slowly getting the hang of it.

For a university project I need to be able to create a form where a user can input a matrix manually.
Also, I need to have something like a ComboBox where I can input how many rows that matrix will need. (1-20 or so)

I have solved the latter part by adding a "When Use"-Code that sets my Array/Matrix of the DataTable to be a Zero Matrix with the correct dimensions in accordance with the value chosen in the ComboBox.
(This is for a composite calculation, the ComboBox gives the number of plies, the matrix defines the ply orientation)

I then expected that the ZeroMatrix would serve as the baseline and the user can then manually edit the Matrix to be the correct values manually, but this gives me the error message that the DataTable cannot be edited.
I suspect the ZeroMatrix is now the "Master", because I defined it via Code.

Working with "visibleRows" did not help, because it does not change the matrix size only the size of DataTable and the user can still scroll down.

What I need is that I have a fully editable DataTable with exactly the number of rows that I specified using the ComboBox.

Does anyone of you perhaps have an idea what I could do to achieve this?
Any help would be fantastic! :)

Best Regards,
Lennart

## How do I plot a vector that has NA in it?...

Hello everyone

I am trying to plot some vectors that have both numeric entries and NA. The vectors represent the root of some function depending on certain parameters (NA means that there is no root for these parameters) and I want to represent the value of the root (vertical) vs the vector that store the variable parameter (horizontal) omitting the values that yield NA. Is there a fast way to do that?

Thank you so much in advance

## vector of coeffs derivatives in expression...

hi

i have expression like

z:=f0(x) + f1(x)*diff(y(x),x) + f2(x)*diff(y(x),x,x) + f4(x)*diff(y(x),x,x,x,x) ... etc ;

always linear terms diff((y(x),x) etc, never like diff((y(x),x)^2

want vector with coeffs of diff((y(x),x) etc in order low to high so want

<f1(x), f2(x), 0, f4(x) ...>

if z:=f0(x) + f2(x)*diff(y(x),x,x) + f4(x)*diff(y(x),x,x,x,x) ... etc ; want <0, f2(x), 0, f4(x) ...>

first term in vector always for diff((y(x),x)

how to do thanks

## How to write code to solve Differential Transforma...

U(0, h, m)=0 for h=1 .. 10, m=0..10.?

## Style of error bars using errorplot command...

Hello everyone,

I am trying to represent a set of data using the errorplot command as follows

plotlims50 := ErrorPlot(xcoords = vectorl, sigmasl50, yerrors = [0.1e-1, 0.4e-1, 0.1e-1, 0.3e-1, 0.3e-1, 0.6e-1, 0.6e-1, 0.1e-1, 0.4e-1, 0.6e-1, 0.5e-1, 0.3e-1, 0.2e-1, 0.2e-1], color = "green")

I guess it's okey, but I would like to have that kind of small lines at the end of the bar and perpendicular to it (like in the image below). Is it possible?

Thank you so much in advance

## How do I get maple to assign values from a file to...

Hi,

I'm working on a procedure involving conic equations such as follows...

Conic:=a*x^2+2*h*x*y+b*y^2+2*f*x+2*g*y+c;

and I have a file filled with values in order of the variables I want them assigned to.

e.g 2,-6,3,0,0

I'm only looking for the specific command I need for maple to link the two.

Any help would be greatly apreciated.

## Resize plots with legends and export...

Hello everyone,

I'm trying to generate plots in Maple so that I can export the image and be easily read in a document. I usually use the plots [display] command as I often reuse "subplots". The main problem appears when entering a legend, as it disrupts the proportions and I have to rescale everything manually. In doing so I sometimes get small, hard-to-read images or captions. Is there any way to resize the image and caption other than manually? Even better, is there a way to scale both to a certain image size and to make the caption legible at that size (e.g. image 7 cm wide and font equivalent to 10 pt in Word)?

Thank you so much in advance

## Trouble setting up a procedure...

Hi, I'm having trouble setting up a procedure for an assignment, we're trying to find root mean square error and remove variable by variable to find the best line of fit etc etc... hopefully from the coding you can see what I'm am trying to do, but I don't understand why it is not working? I wonder if it has something to do with the X and Y being read in?

convert(M,matrix):
with(LinearAlgebra):
n:=RowDimension(convert(M,matrix));
X:=convert(M[1..n,1..4],matrix):
Y:=convert(M[1..n,5..5],vector):
with(Statistics):
FullEQN:=LinearFit([1,a,b,c,d],X,Y,[a,b,c,d]);
#the next part is incomplete
rmse_mlr:=proc(Full)
local i, sq, n, predicted;
sq:=0:
for i from 1 to n do
predicted:=subs([a=X[i,1],b=X[i,2],c=X[i,3],d=X[i,4]],Full);
sq:=sq+(Y[i]-predicted)^2;
end do:
return sqrt(sq/n);
end proc;

I then test the procedure with
rmse_mlr(FullEQN,X,Y);

and the response i get is

Error, (in rmse_mlr) final value in for loop must be numeric or character

help?

## Conic Classification...

I can't figure out how to write a program to work out the classification of a conic and if it is a degenerate given a data file.

So far I have programed the following which reads the conic coefficients (a,h,b,f,g,c) and displays it as an equation:

conic :=proc(a,h,b,f,g,c)
local C;
C:= a*x^2+h*x*y+b*y^2+f*x+g*y+c=0;
end proc:

Can anyone help me work this out

## How I can creat code to find coefficients of produ...

Hi I have product of function Q along with its derivative.

Q'j(x)*Qi(x) for j=0,1 and i=0,...n.

how can i make loop  to collect all coefficeints for this function for j=0,1 and i=0,1,..n.

i hope some one will help me.

Thanks

## How to get maple to stop plotting once values beco...

Hi Everyone, So i have a pretty ugly function which i am interesting in plotting. When i plot it seems that all values are real however when i do evalf with specific values of variable i am plotting over it shows that it is complex. Any thoughts on how to get it to stop plotting once it becomes complex? See attached maple file.

ComplexPlotQuestion.mw

Thanks.

## How to keep incremental count in Maple? ...

I am trying to count of the number of primes p such that when p is concatenated with 1 (ie p1, or 10*p+1),  if p1 is composite then we record the result 1, else  2. This gives the minimum k for which the concatenation pk is composite, and k is always either 1 or 2. It would be interesting to compare the number of primes with 1 and those with 2 up to a given max. I have already written a code which calculates the 1 or 2 for each prime but have not managed to adapt it keep count.

I would like to have a code to keep a count  of the 1s and 2s, thus being able to say that up to 10^k we see {a, b} where a is the number of primes with "1" and b is the number with "2".

Ideally I would like to be able to output plots of these data for any k =1,2,3,... up to a pre declared maximum k value, so as to make comparative graphs. I do not know how to organise the counting process, or if it is possible to get Maple to do the plots as well. Can anyone please assist me with this? I have Maple 2017.

Best regards,

David.

## Maple 2017.3 problems with complex numbers, solve,...

Hi,

Maple 2017.3 has these problems which hamper my work with it. I shown three examples.

Example 1: Maple cannot recognize automatically that two complex numbers are equal:

[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);

Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).

Example 2:

[>sys1:=[_xx[1]+lhs(eq1),_xx[1]+rhs(eq1)];
[>solve(sys1,[_xx[1],_xx[2]]);

Example 3:

[>alias(omega=RootOf(_Z^2+_Z+1));
[>rt:=(-1+I*sqrt(3))/2;

Maple fails to substitute the alias and recognize that rt=omega.

Any suggestion on a work-around problems 2 and 3 would be helpful.

Thanks,

Rafal Ablamowicz
www.math.tntech.edu/rafal/

## Which 3D plot I should use if I want to plot a sur...

Hi everyone, I hope you are staying safe from coronavirus.

I have a table of data points in excel (attached file) and want to plot a smooth surface plot in Maple, the plot will look like in the image below. How can I do it in Maple (2017)? I tried matrixplot(matrix) and the surface is good. However, I couldn't change the X, Y axes value since it should be the default value.

Thank you very much.PlotTest.xlsx

## How to search and remove elements in a list of var...

Hello

Unfortunately I run out of ideas on how to solve the problem of searching and removing elements in a variable size list.  Below you can find an example.

```parms:=[seq(seq(alpha[i,j],j=0..9),i=1..3)];
abc:=combinat:-choose(parms,3):```

the condition to remove the element of the list is given by the following procedure.

```conds:= proc(varCoef::list,vars::name:=alpha)
local T1,T2,res;
#
T1 := table([2=3,3=2,5=6,6=5,7=9,9=7]):
T2 := table([2=3,3=2]):
#
res:=map(u->vars[`if`(assigned(T2[op(1,u)]),T2[op(1,u)],op(1,u)),
`if`(assigned(T1[op(2,u)]),T1[op(2,u)],op(2,u))],
varCoef);
res:=convert(convert(res,set),list):
end proc:```

Something like

`member(conds(abc[1]),abc,'k')`

if it is a member, the element indexed by k should be removed from abc and then the search continues using the next element in abc (that now has one less element).   Otherwise, the element is kept and the search moves to next one.  The process ends when the last element in a short version of abc is tested.

Thanks all for the help and patience.

Ed

 2 3 4 5 6 7 8 Last Page 4 of 40
﻿