Skip to main content
Best answer by -MFra-

AIM.jpg

AIM1.jpg

AIM1.jpg

AIM2.jpg

4 replies

23-Emerald IV
May 25, 2016

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

aimtiaz1-VisitorAuthor
1-Visitor
May 25, 2016

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

23-Emerald IV
May 25, 2016

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

21-Topaz II
May 25, 2016

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

fig3.jpg

aimtiaz1-VisitorAuthor
1-Visitor
May 26, 2016

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

23-Emerald IV
May 26, 2016

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

aimtiaz1-VisitorAuthor
1-Visitor
June 12, 2016

Thank you very much ( in delay .)

-MFra-21-Topaz IIAnswer
21-Topaz II
May 27, 2016
aimtiaz1-VisitorAuthor
1-Visitor
June 12, 2016

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