Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matrix assignment in a For Loop

Status
Not open for further replies.

Kultigin

Mechanical
Joined
Dec 22, 2003
Messages
3
Location
TR
Hi,
I'm using Mathcad 2001 and I wrote a very complicated program that consists of a For loop. When I want to compare a variable u[n] with its previous value u[n-1] in the loop, I naturally assign it to another variable at the end of the For loop, i.e. uold <- u but Mathcad somehow updates the previous value. Therefore;
u[n]-u[n-1]=0
When I tried the single variables, there's no problem, however if my variable is a vector/matrix, the problem occurs. Is there anyone who faced a similar problem as me??
Thx...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top