Hello to every one! I'm tring to develop my first program in Ti basic, and I have a problem. I have to draw th function:Y=Ho+0.0012*(Qu+q/l*x)^2*x with Ho, Qu,q and l elements of a matrix. I try the instruction:

:For i,1,n

:DrawFunc(Q[i-1,17]+0.0012*(Q[i,9]+(Q[i,6]*x/Q[i,2])^2)*x)

:endFor

:DispG

but it doesn't work. Someone can help me, please?

First, a few questions about your code:

What are you trying to do?

What size is matrix Q?

Second, a response based on what I have so far:

Your code starts with i as one, and then attempts to get Q[i-1,17], which is equal to Q[0,17]. This is an illegal instruction.

Try this (after shifting the matrix down a row):

:For i,1,n

:DrawFunc(Q[i,17]+0.0012*(Q[i+1,9]+(Q[i+1,6]*x/Q[i+1,2])^2)*x)

:endFor

Also, you don't need to use DispG, as DrawFunc updates and displays the graphscreen.

Hi, i'm tryng to draw the piezometric line for hydraulic engineering exam. Q is a matrix [n,21] where n is node's number.

I wrong to write my code in last post, it is

:For i,2,n

:DrawFunc(Q[i-1,17]+0.0012*(Q[i,9]+(Q[i,6]*x/Q[i,2])^2)*x)

:endFor

Thenkyou for your help

Can you tell me the matrix values? Or, can you tell me what the elements highest expected values are?

Q[i-1,17] max 300

Q[i,9],Q[i,6]<1

Q[i,2] max 5000

I think the problem is with with the graphscreen settings, and i'm working on finding an approprate window.

EDIT: Nevermind. Its a problem with DrawFunc. DrawFunc apparently doesn't read x the same as a y= function, but there is a way around this. I think.

EDIT: Also, there is a problem with my graph settings.