why do i get "range out of bounds" for v(i) = x(i) * y(i)?
Please Login or Register to view this content.
why do i get "range out of bounds" for v(i) = x(i) * y(i)?
Please Login or Register to view this content.
Last edited by Cutter; 07-24-2012 at 07:54 PM. Reason: Added code tags
What is "size"?
Entia non sunt multiplicanda sine necessitate
size is 1000 data values. i want to loop through using range of 50 points
Is that a function you're written? A public array? Something else?
What's the size of the array (look in the Locals window) after the line executes?
What are the dimensions of x and y? How are they passed?
Please Login or Register to view this content.
Last edited by Cutter; 07-24-2012 at 07:55 PM. Reason: Added code tags
is the lower bound of x zero?
Josie
if at first you don't succeed try doing it the way your wife told you to
We can look at your code, or look at your problem.
Regarding your problem, you didn't answer my question about the array dimensions when the subscript error occurs.
Regarding your code, what does it do for OLS regression that you couldn't do in a few lines using LinEst?
Please Login or Register to view this content.
Last edited by shg; 07-24-2012 at 06:05 PM.
@ blw2002
Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
Thanks.
that's the problem then. you're trying to refer to v(0) but v is using base 1 so there is no v(0). you could use v(i + 1) or be consistent and base everything at 0
I am still getting v(i) = x(i) * y(i) is out of range. Here is the full code. Any thoughts?
Please Login or Register to view this content.
Last edited by Cutter; 07-25-2012 at 08:19 PM. Reason: Added code tags
same reason.
what do i change exactly?
you need to redim v to the same dimensions as x
Please Login or Register to view this content.
it's not working. did you try?
not working in what way?
i still get the same "subscript out of range" for v
Post the code with the error, please.
Remember what the dormouse said
Feed your head
blw2002
When you post your code, as requested by romperstomper, please add code tags. I brought that rule to your attention in post #8. In post #11 you failed to apply the tags so, once again, I added them for you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks