while cycle with functions
while cycle with functions
(OP)
Hi, i would like to do a while cycle with functions inside. i have tried but seems that mathcad dont like functions inside.
what i want to do is augment a matrix i times like this:
i want my while cycle to augment N(x) matrix with A(x) to result in this:
so the cycle i have made is:
Can you please help me in this problem?
thanks
what i want to do is augment a matrix i times like this:
CODE
A(x)=| f(x) 0 | <- this is a matrix with a function
| 0 f(x) |
| 0 f(x) |
i want my while cycle to augment N(x) matrix with A(x) to result in this:
CODE
N(x)=| f(x) 0 f(x) 0 ... |
| 0 f(x) 0 f(x)..|
| 0 f(x) 0 f(x)..|
CODE
A(x):= | f(x) 0 |
| 0 f(x)|
i:=0
N(x):= while i<3
A(x) <- augment(A(x),N(x))
i:=i+1
N(x)-> doenst calculate. it takes lot of time and nothin
| 0 f(x)|
i:=0
N(x):= while i<3
A(x) <- augment(A(x),N(x))
i:=i+1
N(x)-> doenst calculate. it takes lot of time and nothin
thanks
RE: while cycle with functions
CODE
| 0 f(x)|
i:=0
N(x):= while i<3
vvv Recursive call
A(x) <- augment(A(x),N(x))
i:=i+1
RE: while cycle with functions
that means that i want to enlarge matrix A(x) with N(x) from the left to the right.
If i remove N(x) i cant augment the matrix.
i can do it manually, with no while cycle and i can do it too with a while cycle without functions. if i use constants instead of functions that routine works.
about the increasing variable i, i have it inside the routine, that is a mistake.
Thanks anyway :)
RE: while cycle with functions
P.
RE: while cycle with functions
|i<-0 ->
|M<-N(x)
|while i<3
| |i<-1+1
| |M<-augment(A(x),M)
RE: while cycle with functions
see the following image:
(german "erweitern" = engl. "augment")
The MathCAD sheet is avaible at:
ht
Christian
RE: while cycle with functions
I'm sure it can be done. there are some examples such as Tom Gutman's Hessian, Ravel, etc. utilities on the http://collab.mathsoft.com/~Mathcad2000 forum.
The live symbolic can be called within a programme!
Philip