Display Array / Vector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Display Array / Vector
Hiya,
Kindly can any one shed some light, for how to show data in the array or vector.
My code is attached below as image.
Solved! Go to Solution.
- Labels:
-
Statistics_Analysis
- Tags:
- data_modeling
- vector
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
use "hold<-match(max(ste),ste)[0"
match will, as already described for lookup, always return a vector, not a scalar. This is necessary as there could be more than one match. The expession above will give you always the first one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Your code isn't attached at all. You should in any case attach the worksheet, not a screenshot. If you cannot do it as of company rules you will have to create a stripped down worksheet with dummy data.
We don't see how time_err is created and therefore can only guess, why you have a vector consisting of 1x1 matrices instead of scalars. Best guess is that you used one of the lookup functions, which always will return a vector, even if they find only a single value.
So if you expected a "normal" vector of scalars you should change the creation of time_err accordingly using the vector subscript.
If you are happy with the vector you have, to SEE the values you should chose to "expand nested arrays" in the format menu you get double clicking the result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Your data "time_err" is a matrix of matrices, that's what all the [1,1]'s are showing--each cell of time_err is a one element [one row, one column] matrix.
You have several options:
1) select the time_err = statement,
select "format\result"
second tab (Display Options), expand nested arrays
2) Find the code that creates time_err row by row and adjust it so that the result is not a matrix (sometimes
the simple addition of "[0" (array subscript 0) in the right place is all it takes!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Nothing effects when I change format/result display option to expand nested array.
Iam just looping for m value and saving max value in time_err, as shown in above code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
use "hold<-match(max(ste),ste)[0"
match will, as already described for lookup, always return a vector, not a scalar. This is necessary as there could be more than one match. The expession above will give you always the first one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks , got it.
Regards.
