Items tagged with array array Tagged Items Feed

Hi!

I get the result which was stored in table, such as:

m:=table([1=[151,153,155,160],2=[157,152,153,150],3=[161,158,152,156]])

I can't export it to excel, because the type of m is table, the export  instruction must be array or matrix.

Please help me, Thank you!

Hi! I need help with my project I dont know where to even start!

Question:

Consider a simple polymer , which consist of long chains of simple molecules attached to each other, e.g:

....-CH2-CH2-CH2-...

If the interaction energy between consecutive sections ca be ignored or is low enough, the chain can be bend around at varios places to form varios configurations. One can start by  fixing the first section...

At one step of my code I need to define an array of functions which I will later use.

Simplified version of it to highlight the problem:

restart:with(linalg):
procG:=proc(a,b) if a>b then a-b else 0 end if end proc:
F:=vector(2):
for i from 1 to 2 do F[i]:=x->i*procG(x,0) end;

In the actual code array is much bigger and the expression for each function is much more complicated so using the cycle is a real 'must'.

Instead of F[1...

I have a data set that represents some parameters at different locations in a (linear) system. The way the data are organized is as 1-d vectors which in turn are combined into an Array. I.e. Array[1] is the first vector; Array[2] the second and so on. Each vector represents a data subset, all subsets are against a common independent variable, call it Knob. I plot one of these subsets like this:

plot(knob,vector[1],style=point);

That works fine & I can replace...

First of, thank you commenters, you have helped me so much in the past!

I am doing a matrix inversion with random numbers and I would like to loop the process, and have each inverstion go into a matrix, such that the matrix will be a bunch of rows ( i number of rows) and three columns (the matrix inversion yeieds three values)

 

> for i to 2 do;
>
> a1h := Generate(float(range = 0.1316881e-2 .. 0.1359706e-2)); a1f := Generate(float(range = .317149811 .. .327463626...

I more than 20000 data points on a an excel file and i want to plot one column against the other. So I imported 10 data points from each column seperately and tried ploting it as a normal plot but it would not work. I kept on getting error messages like 

plot([CosAa,CosBb]);

Error, (in plot) incorrect first argument [Array(1..10, 1..1, {(1, 1) = 0.83333e-2, (2, 1) = 0.166666e-1, (3, 1) = 0.249999e-1, (4, 1) = 0.333332e-1, (5, 1) = 0.416665e-1, (6, 1...

I have the following problem. Two formulas in three variables represent the costs of algorithms. I want a visual of their ratio, so that I can "see" how their relative performance varies. Here is a simple example. I can analyze this example analytically, but you can't always do that.

R := sum(binomial(n+i*d,n),i=1..k-1);
S := binomial(n+k*d,n);
f := unapply(R/S, n, d, k);
A := Array(1..10,1..10,1..10,f,datatype=float[8]);

I want a 3-dimensional rendering...

Hi, below is what I have. I am trying to change elenum:=Array([2,4,6,8,16])

Then I changed my E0:=evalf((map(c->c*((map(int,((B^%T).(B1).J),eta=0..1))),L))

I also changed my E2:=evalf(map(c->c*map(int,((B2^%T).(B2).J),eta=0..1)),(1/(2*L))))

My E0M:=Matrix(nodes), which I am not sure if it is correct.

Then I tried to use the for do statements, it would not allow me to do so. What i'm trying to get is the first one to be a 5x5 matrix, followed...

Hi, I have a array with 5 numbers in it. I would like to multiply it into a 3x3 matrix, how do i do that?

for example A:=([3,5,7,9,15])

B:=Matrix([3x+4,2x-9,42],[8x+2,93x^2,6y],[5x/y,34y,32y^2])

how do i get 5 sets of output when i multiply it together? And can i get pick out each outpur as well? for example, I want the 3rd output which is the matrix multiply with 7, can I pick it out seperately if I wanted?

Please advice. Thanks

how to override Array type? Want workaround next behaviour for float array:

a:=Array(1..10,datatype=float)

a[1]:=((2)^(4/9)+sqrt(2));
Error, unable to store 't^(4/9)+2^(1/2)' when datatype=sfloat

i.e. to call convertor before assignment. Can i principally to do so?

And yes, no hfloats. I need sfloat. Sow in help that some types could be created like objects (stack, queue etc).

Hi, I'm trying to have my half circle divided into equal gaps of 33 , but am not sure what to use. I tried using Array, Sequence, Matrix... But don't think i'm doing it right. Here is what I have :

gap :=pi/(16*2)

I want a sequence of [0,0.0982,0.1963,0.2945,0.3927etc] in a vector form. May I know what is the proper way to do it please?

Many thanks.

 

isnin:=proc(A)
local i,j,f,B:
B[1] := 0:
for i from 1 to numccs do


f:=Size([entries(B)][i][1],2); <---


for j from 1 to f do
if Equal([entries(A)][1][1],[entries(B)][i][1][j]) then
return false:
end if:
end do:
end do:
return true:
end proc:
 

Do you know why maple wont evaluate f?

If it's not something obvious context is below...

If there's some equivalent to a dynamic array in maple I'd really like to know!

Hi everyone,

One minor question:

what would be the code to extract data in the form of 2-d points from the output of dsolve/numeric... output=Array/array?

say, I have 6-d ODE system and I wnat to extract data in the form of 2-d arrays of number s and then approximate this with some polynomials via Curve Fitting package.

For this I need the data to be represented as -dim matrices  for every variable.

Thanks for any help.

Hi everyone,

I am trying to build a function of dsolve/numeric solution which would not include procedures for defining the value of it.

First, I need to extract solution as a 2-d array, which will contain all evaluated points of solution.

Next, I want to define a function from this set of points (like interpolation).

Say, I have an array or list of numbers (2-d points).

Now comes the main question: is there a way to interpolate some...

Hello, I've got a simple question in Maple7. I tried to fill the array "intXdA()" in the for-loop but I failed. How I have to declare it after "global" in the beginning? Is it possible to declare it after "n" is determined - so that it has n elements?

restart:
with(plots):


> flsp:= proc(f,ug,og) global i,n,intXdA()
   y:=unapply(f,x):
   if  ug<0 and og=0 then n:=1 end if:
   if ug<0 and og>0 then n:=2 end if:

1 2 3 4 5 6 7 Last Page 1 of 20