cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to combine matrix & 'For' loop .....

SOLVED
Highlighted
Newbie

Need to combine matrix & 'For' loop .....

I'm facing a problem related to matrix element used in a program . I'm attaching a math Cad prime 3.1 file .

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Need to combine matrix & 'For' loop .....

9 REPLIES 9
Highlighted

Re: Need to combine matrix & 'For' loop .....

You are using 'x' to index into the column of your matrix 'N.B'. column indezes can only be integer values. You step x from 0.5 to 1 in steps of 0.001. That is not going to work...

Use different variables for the stepping value, and the index of the matrix.

Luc

Highlighted

Re: Need to combine matrix & 'For' loop .....

I just want to store data in a matrix used in a for loop .............. how can i do that???

Highlighted

Re: Need to combine matrix & 'For' loop .....

Looking once more at your program i doubt if it works at all: I don't know if the assignment to f(x) works in a program...

But first try to separate the index 'x' from the stepping 'x'. To do that, change the first assignment to x into:

so use a capital X instead of the lower case.

Also change the column indexes to N.B that use the lowercase 'x', to use the uppercase 'X' instead.

Now you shouldn't get the red to the index 'x' of N.B  anymore.

Success!

Luc

Highlighted

Re: Need to combine matrix & 'For' loop .....

With the data provided and your program, you can only do the following:

fig3.jpg

Highlighted

Re: Need to combine matrix & 'For' loop .....

I am attaching another file ............. please solve the problem once more for my better understanding .

Highlighted

Re: Need to combine matrix & 'For' loop .....

Your program does not make sense at all, and it confuses me when I'm trying to understand what kind of result you want.

Does this come any near?

Luc

Highlighted

Re: Need to combine matrix & 'For' loop .....

Thank you very much ( in delay .)

Highlighted

Re: Need to combine matrix & 'For' loop .....

Highlighted

Re: Need to combine matrix & 'For' loop .....

Thank you very much . Now I can understand it clearly .

Announcements