Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello everyone 🙂
I want to do exponential regression, I saw a YouTube source about it. Link https://www.youtube.com/watch?v=O0LbLATVboU&t=320s.
However, I face some errors when I want to choose some value in a matrix. The error shown in the figure below pops up.
Error: This array index is invalid. The index must be an integer, not less than ORIGIN, and not greater then the last element.
Can you help me?
Note: I attached the Mathcad and Excel files.
Solved! Go to Solution.
Hi,
Here is a plot of both original data expressed as dots and function defined by line.
Important has a range defined by "range", It is not a variable but an index.
Important has a column vector variable called "x" you can use.
Zero is the first element index by default unless you set ORIGIN worksheet variable
Hi,
Here is a plot of both original data expressed as dots and function defined by line.
Important has a range defined by "range", It is not a variable but an index.
Important has a column vector variable called "x" you can use.
Zero is the first element index by default unless you set ORIGIN worksheet variable
Thank you, it was helpful. 🙂 I appreciated it.
Thank you, it was helpful. I appreciated it. 🙂
There is a system variable ORIGIN which either can be set via the menu or simply like any normal variable by typing ORIGIN:=....
This system variable tells Prime what the index of the first element of a vector should be. By default this variable is set to 0, but the sheet in the video seems to have it changed to ORIGIN:=1.
"Data" is a two column matrix and as in your sheet the default value of ORIGIN=1 has not been changed, the column numbers are 0 and 1. This is the reason you get the error when you try to access column number 2 of Data because this would be the third column and it does not exist.
Solution was already shown in the pictures of Terry and Cornel - simply use the indices 0 and 1 instead of 1 and 2 when you define the vectors "Adata" and "Bdata".
Of yourse you could also change the value of ORIGIN from the default 0 to 1 so you could use the indices shown in the video unchanged.
Thank you, it was helpful. 🙂 I appreciated it. I didn't know the origin, but now I got it.