Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Dear all,
I have a column of values stored in the variable "i". My intent is, I want to utilize a while loop with a continue/break statement to track a specific range of numbers within the column based on a given input row index. For instance, if I input the row-index value of "4", I would like to extract the range of values from the 4th index of variable "i" until the end.
Please help.
Thank you
Solved! Go to Solution.
This is what the submatrix() function is made for - look it up in the help.
Your example: submatrix(i, 4, last(i), 0, 0)
Thabk you for your reply. I intent to use the while loop with break/continue statement because I want each extracted value to be assigned on a separate variable and show the new variable as a range
@fahmed-2 wrote:
Thabk you for your reply. I intent to use the while loop with break/continue statement because I want each extracted value to be assigned on a separate variable and show the new variable as a range
??????
You would have to give one or better a couple of examples which show what you are looking for.
Show for each example the input values (vector and limit index) and also the data structure you want as a result.
You shure would have a hard time to assign each value from 5 to 100 (your given example) to a separate variable and you sure can*t use it as a Prime range variable!
Thank you @Werner_E . your approach worked great and saves a lot of effort. I now have two single column matrices ("i" and "j") and would want them to be combined into a single column matrice. The condition would be in the new matrice, the first part will be filled with the values from "i" and immediately after that, the second part will be filled with the values from "j". Both matrices "i" and "j" will have arbitrary range of values . Please help.
Thats what the stack() function is made for!
new:=stack(i,j)