Skip to main content
1-Visitor
September 24, 2012
Solved

Need help defining a vector f(a,b) whose i th elements depends on (i-1)th element

  • September 24, 2012
  • 1 reply
  • 1100 views

I am running into others problem.

I would like to know how to define a function, F(a,b), whose (i)th element depends on the (i-1)th element. F(a,b) is a vector. I have trouble using the notation of [, such as:

F(a,b)[i+1 :=F(a,b)[i +1

Mathcad does not allow me to define the following

F(a,b)[0 := XXXX

F(a,b)[1 := yyyy

etc....how I can do it? I can define F[0. F[1, but my function contains variable a and b which needs to be solved

What I need to do if to find the parameter to fit a set of data. I know the derivative of the data,

dy/dx = a*(1-(constant)/y)^b , I am trying to find the parameter of a and b that can fit my data. I needed to minimize the residual by changing a and b.

Note: I do not want to infer dy/dx from the data and use the known equation for dy/dx to do the fit...

I would like to fit y vs x numerically with the knowledge of dy/dx.

I do not know how to tell mathcad what I am trying to do.

Need help very badly on this one. Thank you very much

Best answer by AlanStevens

Using the ODE solver might be better - see attached.

Alan

1 reply

19-Tanzanite
September 24, 2012

Using the ODE solver might be better - see attached.

Alan

1-Visitor
September 24, 2012

Thanks Alan. You have been very helpful. I have to get myself familiar with with the notation of

left handed || and <-- though. Thanks