 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] RE: How to fill a column of a matrix?
| [mathcad] RE: How to fill a column of a matrix? |
|
Author: Marc Artzrouni
Posted: Wed, 18 Jan 2006 12:44:11 +0100
|
Many thanks to all those who suggested using the column operator - and
that works just fine for a whole column. My problem
is in fact a bit more general . I want to be able to fill any m by n
rectangular subset of a matrix A with a matrix M of dimension m by n.
So I really want a function submatrixin (inspired by the existing
"submatrix") :
A1=submatrixin(A,r1,r2,col1, col2, M) that creates a replica A1
of A and replaces row r1 to row r2 and column col1 to col2 of A with M
. Of course the dimensions have
to be right ; if M has m rows and n columns then r2-r1+1 must be m and
col1-col2+1 must be n.
The obvious answer if no such function exists is to write it myself - it
will take all of 3 or 4 lines.
It could be in a special "myfunctions.mcd" file
with other generic "personnalized" functions that I can have easy access
to by adding a "reference" to myfunctions.mcd in any worksheet
in which I would need submatrixin. No doubt that's routine for all the
MathCad experts out there.
I suspect though that a "built-in" function would do the job a lot
faster and better than my own function -
particularly if the program has to go get the function in another
file ! !
Marc Artzrouni
Marc Artzrouni
Département de Mathématiques (IPRA)
Université de Pau - BP 1155
64013 Pau Cedex
FRANCE
Home page/page perso:
http://www.univ-pau.fr/~artzroun/
**********************************
tel: + 33 - (0)5 59 40 75 50
fax: + 33 - (0)5 59 40 75 55
e-mail: "marc.artzrouni"
**********************************
|
[View Complete Thread]
Previous by date: [mathcad] Re: Help with creating a vector, Sven Lindhardt
Next by date: [mathcad] How to create a subvector from a vector?, Koko Koko
Previous thread: [mathcad] RE: How to fill a column of a matrix?, Oakley, Philip SELEX UK
Next thread: [mathcad] How to create a subvector from a vector?, Koko Koko
|
|
|