Items tagged with row row Tagged Items Feed

In order to make worksheets more interactive in a teaching environment I have begun playing around with the Tables the standard GUI provides. The idea is that in the left column is the script we are working through while in the right column is space a student can work with the equations and formulae from the left side to, e.g., plot, change parameters etc. without affecting the script too much.

To build the tables I copy-pasted code from a normal worksheet (in document mode) into the left column, creating rows of appropriate length to have a logically coherent section in one row. Usually one row is one Section (in the technical sense of Maple Sections). The student gets to play in the right column.

In principle this seems to work quite well in my preliminary testing. I did find out rather quickly that on the right side one needs to be in 1-d input mode with a prompt for anything to be calculated interactively. Ok, actually probably easier to do. The table is set to evaluate by row so the right-left correspondence is preserved.

A potential issue I am facing however is with equation numbering: I use equation numbers extensively to reference back to upstream results. In the Table, it appears that equation numbers are not unique; in each row of the Table, eq. numbers start as (1.1), (1.2) etc. I am able to reference back to results from a prior row, even though the same equation number will show up again later in the new row. But I am concerned that eventually this all ends up in a big mess and my references point to the wrong expression or equation. Non-unique line numbers seem like a Really Bad Idea, and I'd like to avoid that if possible.

Does anyone know how the lines numbers work for code in Tables and how I make sure they are unique? I suppose I could explicitly assign results I need in other rows to names, but that does not prevent a reference to an eq. number from pulling in the wrong one from a prior row (assuming for the moment that Maple will never look forward to resolve a reference).

Thanks,

Mac Dude

Hi guys! Maple noob here.

I want to get an array of the sums of each and every row of a matrix which I imported from Excel. I can't manage to work my way around with LinearAlgebra-Add, Sum and eval. Maple always shows me the table and not the scalar I am looking for.

I'd also like to know how to tell Maple how to do something on a certain interval of cells of the matrix.

I hope I have been clear and you can help me out :D

Cheers from Italy!

Hi all,

I am trying to get the following matrix:

restart:
int00:=Matrix(3,3);
int00[2,2]:=a;
int00[2,3]:=b;
int00[3,2]:=c;
int00[3,3]:=d;
int00;
cols:=MTM:-sum(int00,1);
rows:=MTM:-sum(int00,2);
int00[1,1..3]:=-cols:
int00[1..3,1]:=-rows:
int00;

int00[1,1]:=a+b+c+d:
int00;
MTM:-sum(int00,1);
MTM:-sum(int00,2);

How do I get the sum of all elemnets in the 'original' matrix? Bascially, the int00[1,1] term in the toy example.

Hi all,

A := [[1,2],[3,4]];

A1:=convert(A, Matrix);

 

I am very happy with conversion between Matrices and Vectors.

However, I does not seem to be able to do this backwards to [row] or [column] Vectors???

Say how do I get back to A from A1???

 

I tried to use

convert(A1,Vector);

convert(A1,Vector[row]);

convert(A1,Vector[row],2);

 

And many others...

hey guys , my concern is about boundaries in random matrix or rtable. so, i can garantee that boundaries in  matrices are in 0 and 10, but i can´t impose a restriction  like the sum of row must be equal 10 for example.
help !! 

pop:=(10-0)*ArrayTools:-RandomArray(proc(A)
local i
if A::rtable[row] then 
seq(A(i),i=1..NumElems(A));
else
args
end if 
end proc(10,3))+0; 

Suppose I have a matrix M, with rational entries. I need to go row by row and scale each individually by the smallest possible integer such that the entries in each row are integer-valued - anyone have an easy way to do this? It's a large matrix.

 

I have data organized in a Matrix from which I want to select a sample based on a certain (simple) criterion, e.g. no cell in the first column to be negative.

I was quickly able to find a way to do it, inspired by a method Preben Alsholm used in a recent mapleprimes post.

But, I wondered, is that the most natural approach? So I quickly found another approach and compared them.

Any other suggestions welcome. Particularly methods that could...

Page 1 of 1