Items tagged with table table Tagged Items Feed

Hello,

In the creation of package wrapping some procedures, may you tell me the differences between using a table or a module so as to wrap the procedures ?

In my case, it seems to me that table is more convenient since I can create with table packages while keeping my program with a structure of section, subsection, ...

But, I'm a beginner in the use of packages. Consequently, I'm very interested in your opinions on this question.

Thanks a lot for your help

 

``

restart

``

``

(1)

``

interface(displayprecision = 4)

-1

(2)

(3)

NULL

``

Vert_Coef := Matrix(10, 5, {(1, 1) = 0.332e-1, (1, 2) = 0.187e-1, (1, 3) = 0.104e-1, (1, 4) = 0.52e-2, (1, 5) = 0.21e-2, (2, 1) = 0.509e-1, (2, 2) = 0.301e-1, (2, 3) = 0.166e-1, (2, 4) = 0.83e-2, (2, 5) = 0.31e-2, (3, 1) = 0.571e-1, (3, 2) = 0.364e-1, (3, 3) = 0.218e-1, (3, 4) = 0.104e-1, (3, 5) = 0.42e-2, (4, 1) = 0.582e-1, (4, 2) = 0.405e-1, (4, 3) = 0.260e-1, (4, 4) = 0.125e-1, (4, 5) = 0.42e-2, (5, 1) = 0.582e-1, (5, 2) = 0.416e-1, (5, 3) = 0.270e-1, (5, 4) = 0.135e-1, (5, 5) = 0.52e-2, (6, 1) = 0.582e-1, (6, 2) = 0.416e-1, (6, 3) = 0.281e-1, (6, 4) = 0.145e-1, (6, 5) = 0.52e-2, (7, 1) = 0.582e-1, (7, 2) = 0.416e-1, (7, 3) = 0.291e-1, (7, 4) = 0.166e-1, (7, 5) = 0.62e-2, (8, 1) = 0.582e-1, (8, 2) = 0.416e-1, (8, 3) = 0.301e-1, (8, 4) = 0.177e-1, (8, 5) = 0.62e-2, (9, 1) = 0.582e-1, (9, 2) = 0.416e-1, (9, 3) = 0.301e-1, (9, 4) = 0.187e-1, (9, 5) = 0.73e-2, (10, 1) = 0.582e-1, (10, 2) = 0.416e-1, (10, 3) = 0.301e-1, (10, 4) = 0.197e-1, (10, 5) = 0.83e-2})

Matrix(10, 5, {(1, 1) = 0.332e-1, (1, 2) = 0.187e-1, (1, 3) = 0.104e-1, (1, 4) = 0.52e-2, (1, 5) = 0.21e-2, (2, 1) = 0.509e-1, (2, 2) = 0.301e-1, (2, 3) = 0.166e-1, (2, 4) = 0.83e-2, (2, 5) = 0.31e-2, (3, 1) = 0.571e-1, (3, 2) = 0.364e-1, (3, 3) = 0.218e-1, (3, 4) = 0.104e-1, (3, 5) = 0.42e-2, (4, 1) = 0.582e-1, (4, 2) = 0.405e-1, (4, 3) = 0.260e-1, (4, 4) = 0.125e-1, (4, 5) = 0.42e-2, (5, 1) = 0.582e-1, (5, 2) = 0.416e-1, (5, 3) = 0.270e-1, (5, 4) = 0.135e-1, (5, 5) = 0.52e-2, (6, 1) = 0.582e-1, (6, 2) = 0.416e-1, (6, 3) = 0.281e-1, (6, 4) = 0.145e-1, (6, 5) = 0.52e-2, (7, 1) = 0.582e-1, (7, 2) = 0.416e-1, (7, 3) = 0.291e-1, (7, 4) = 0.166e-1, (7, 5) = 0.62e-2, (8, 1) = 0.582e-1, (8, 2) = 0.416e-1, (8, 3) = 0.301e-1, (8, 4) = 0.177e-1, (8, 5) = 0.62e-2, (9, 1) = 0.582e-1, (9, 2) = 0.416e-1, (9, 3) = 0.301e-1, (9, 4) = 0.187e-1, (9, 5) = 0.73e-2, (10, 1) = 0.582e-1, (10, 2) = 0.416e-1, (10, 3) = 0.301e-1, (10, 4) = 0.197e-1, (10, 5) = 0.83e-2})

(4)

``

``

whattype(Vert_Coef)

Matrix

(5)

``

NULL

``

``

``

``

SR := Vector([10.8696, 21.7391, 32.6087, 43.4783, 46.7391, 54.3478, 65.2174, 76.0870, 86.9565, 100.0000], datatype = float)

Vector(10, {(1) = 10.8696, (2) = 21.7391, (3) = 32.6087, (4) = 43.4783, (5) = 46.7391, (6) = 54.3478, (7) = 65.2174, (8) = 76.0870, (9) = 86.9565, (10) = 100.0000})

(6)

E_G := Vector([250, 500, 1000, 2500, 10000], datatype = float)

Vector(5, {(1) = 250.0000, (2) = 500.0000, (3) = 1000.0000, (4) = 2500.0000, (5) = 10000.0000})

(7)

``

``NULL

NULL

``

NULL

``

B_interp := proc (SR, E_G) options operator, arrow; CurveFitting:-ArrayInterpolation([SR, E_G], Vert_Coef, Array(1 .. 1, 1 .. 1, 1 .. 2, [[[SR, E_G]]]), method = linear) end proc

proc (SR, E_G) options operator, arrow; CurveFitting:-ArrayInterpolation([SR, E_G], Vert_Coef, Array(1 .. 1, 1 .. 1, 1 .. 2, [[[SR, E_G]]]), method = linear) end proc

(8)

``

``

f[18*_1] := B_interp(25.0, 1500.0)

Error, (in CurveFitting:-ArrayInterpolation) invalid input: dimensions of independent data do not match the dimensions of dependent data

 

 

Download Matrix_Interpolation.mw

Hello Mapleprime Community,

Would you be kind to help me with the attached Maple worksheet. My goal is to do a 2D interpolation given the value of SR (slenderness ratio) and E_G (Young's modulus / Shear modulus ratio) in the Matrix table Vert_Coeff with header as vector E_G and the other as vector SR. I’m confused as to how to do the interpolation. Please help.

 

Regards,

 

Moses

I would like to extrapolate some values from a table:

What I have now is something like this: 

table [
(1,100)=1,
(1,200)=12,
(2,300)=33,
(3,100)=1,
(1,300)=43,
(3,200)=52,
(2,100)=31,
(2,200)=22,
(3,300)=3,
(4,...)=...]

I would like to have a table with the same value in the first position with changing the second value, for example:

table[
(2,100)=31,
(2,200)=22,
(2,300)=33,
(2,...)=..]


How can I do it?

Hello,

I try to simplify a system of 6 trigonometric equations and then to extract the 3 first equations.

When I conduct my calculations, It seems that that I have some troubles with some index.

There is a term with "table" which is not evaluated.

Do you have ideas why the last equations in my code have a table inside and consequently can not be evaluated?

I attached my code

example.mw

Thank you for your help.

 

 

Hi,

I'm not sure that I mean datatable component corectly.

I also consider that I was done somthing wrong

Thank you for advanced for any help.

restart

with(DocumentTools):

Oryginaly DataTable was inserted as a 3 x 3. I will traing to push maple to obtain 4 x 4 with specific row and column name.

``

SetProperty("DataTable0", visibleRows, 4);

DocumentTools:-SetProperty("DataTable0", visibleColumns, 4);

DocumentTools:-SetProperty("DataTable0", columnWidths, [20, 40, 80, 80]);

DocumentTools:-SetProperty("DataTable0", rowNames, [r1, r2, r3, r4]);

DocumentTools:-SetProperty("DataTable0", columnNames, [c1, c2, c3, c4]);

DocumentTools:-SetProperty("DataTable0", update)

``

``

``


wzel

Download datatable_problem.mw

I would like to generate a table with expansions of the formula p[t]=1/(1-psi*(beta-1))*m[t]-psi*(beta-1)/(1-psi*(beta-1))*p[t-1] for different values of t, perhaps with an Explore function over t. How could I achieve this?

I have use a ''for cycle'' in order to get a series of points. I would like to save those points in a vector in order to use it for the ''PolynomialFit'' comand. The problem is that the points that I save are sort randomly. How can I take the value of the vector A in the right sequence? in the underline string you can plot the walue of A over t (which is not sorted). I can not use the sort command as I used for t even for A because the points are not increasing.

This is my code:

restart;

Atot := 0:

for ii from 0 by 0.01 to 2 do

PtotFkt := ii->  ii^2 :

Ptot := PtotFkt(ii):

Atot := Atot+0.01*Ptot:

A[ii] := Atot: #Save points in a Table

t[ii] := ii: #Save point in a table

end do;

AV := convert(A, list): #conversion from table to list
nops(AV);  #number of points

timme := convert(t, list): #conversion from table to list
nops(timme); #number of points

 

with(Statistics); #PolynomialFit

X := Vector(AV, datatype = float);

Y := Vector(sort(timme), datatype = float);

plot(Y, X, style = point, symbol = asterisk, color = blue);

regress := PolynomialFit(10, X, Y, time);

curve1 := plot(regress, time = 0 .. 2);

As an exercise, I'm trying to replicate the table shown at the end of section 10.3 (Creating Embedded Components) of the Maple User Manual, the table on page 308 of the PDF, reproduced here:

I create a 6 x 3 table, and merge cells of columns 1 and 2 in each of rows 1, 2, 5 and 6, and proceed to enter the text and components from the Embedded Components example 2 to look as above. In column 3, I merge the cells in rows 2, 3, 4, 5 in order to place the plot component as shown. The new cell seems to be considered as in the same row as its top merged cell, in this case, row 2.

I can't control vertical positioning in the plot cell in column 3. If I select the vertical alignment for the plot cell (which sets the same vertical alignment for all of row 2), to Centre or Bottom or Baseline, the alignment is to the centre or bottom or baseline of row 2, not of the plot cell. So when I paste the plot into the cell it extends up from the Centre or Bottom or Baseline of row 2, to well above the table's top border.

If instead I set the vertical alignment to Top, then the pasted plot fits into the cell since the top of the plot now aligns with the top of row 2. But that can be an annoying restriction. Also, I am no longer allowed to set the vertical alignment in rows 3, 4 or 5 because of the merged cell in column 3.

Maple document tables need to have two improvements:

  1. The ability to adjust vertical centring in a single cell (merged or not), instead of just across a row.
  2. The ability to resize row height. Currently it looks like document tables only allow resizing column width.

I guess my question is mainly, is there a better way to go about setting up a document table in order to control fairly precisely how it appears? And to get around some of these formatting restrictions?

 

What does one use to duplicate a procedure along with its remember table, so that they are distinct instances of said?

Hi. I have a commutation table, that I've got as output of Greg Reid algorithm.

Can I use to define Lie algebra for components DifferentialGeometry & Lie Algebras?

Worksheet is attached...

FCT.mw

 

Hello,

I use Maple 18. How can I produce a table of 50 values of the fanction f(x) in the interval [a,b]? size step is (b-a)/n

 

Hi everyone,

I would like to create an eBook with the pakage "eBookTools", but I have got several errors if in my mw document there is a table. The same error came out if I try to compile a book with the sample documents ("GettingStartedWithMaple.mw"). Anyone knows a solution?

Thank you for your time

 

Giorgio

The member function can provide the position of x in table/list s for the first variable

 

e.g.

f:=[a,b,c,a,a];
member(a,f,'p');

will provide p=1

 

If I would like to know the position of all a, [1,4,5], is there any simple way to obtain them? I can do something like

 

n:=0;

for i from 1 to 5 do

 if f[i]='a' then

  n:=n+1;

  p[n]:=i;

 end if;

end do;

 

something like that

Thank you very much

VIM.3.mwHi,How do I make a graph and error table for exact and by using this method i.e VIM 

I would like to get some sort of table (maybe also a plot) that shows me the effect on the function if I change a variable.

For example, I have f(x,y,z)=x+yz

Now I would like to get a list with the results for f if I run z from, say, -10 to +10.

Is it also possible to do this with all variables at the same time?

1 2 3 4 5 6 Page 1 of 6