## 173 Reputation

12 years, 219 days

## Ok, heres how I finally did...

Ok, heres how I finally did it:

A:= <2x|2y|2z|c*s|1,1,1,1,1>;

One last question if you don't mind. I am trying to access the ith element of a column matrix.

Let's say the 5x1 matrix is called S, when I use S[1]: to access the first element, I get a 1x1 matrix. Is there a way to get the number itself (so it acts like a normal number), and not a 1x1 matrix containing the number?

thank you

## Ok, here's how I did it: f...

Ok, here's how I did it:

f := (5, (i) -> (c^2*s[i,j]^2-x[i,j]^2-y[i,j]^2-z[i,j]^2));

k := Matrix(5,1,f);

and it worked.

I have another question if you don't mind, sorry I am new with maple

I want to define a new 5x5 matrix which will be called the coefficient matrix. The matrix k by the way is the constant matrix.

The first column of the coefficient matrix will be 2 times the x matrix, the second column will be 2 times the y matrix, the third will be 2 times the z matrix, the forth will be the constant c times the s matrix, and all elements of the last and final column are equal to 1.

I think I can do it by defining each and every single element of the matrix, but I would like to know how to do it without defining each element one by one.

Thank you

## I have tried but i get...

I have tried

k[i] := c^2*s[i]^2 - xs[i]^2 - ys[i]^2 - zs[i]^2

but i get Error, bad index into Vector

 1 2 Page 2 of 2
﻿