Cannot remove detail from worksheet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Cannot remove detail from worksheet
I've got a worksheet with an issue I don't understand. I have defined a set of sample indices using "i:=0..Nx-1" then build a spreadsheet using vectors with those indices. I wanted to see the array values when Nx=4 so I set the value and all was ok. When I go to remove the detail ... the [0,1,2,3] display that is ... the rest of the worksheet fails with a message "The value must be a scalar or a matrix". I know I'm being a bit vague but I don't really know how to better explain it so I have attached both good and bad versions of the file.
Any help would be appreciated
Thanks,
Paul
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Paul Leopard wrote:
I appreciate your efforts and I see the worksheet you repaired is working just fine. When I compare it to my original that is not working I see no difference though.
There is a difference. As Werner mentioned, your 'Good sheet' worked because of a tricky, undocumented "feature". When you define a range and use inline evaluation like i:=0..3= , the range i is converted to a vector.
Try deleting the inline definition and see what happens.
In Werners sheet he have defined XT using a vector index. Type XT[i and see what happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
When you define a vector using the range i you have to use the vector index (which you get by typing [) and not the literal index (which you get by typing Ctrl -)
It worked OK in your other sheet because of a tricky, undocumented "feature".
When you define a range and use inline evaluation like i:=0..3= , the range i is converted to a vector.
It didn't matter that you used the literal subscript, because you just did vector operations - the i in the name of your variables had nothing to do with the range/vector i but was just part of the variable name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It works fine until I try to delete the element value display from the end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In the meantime I edited my above post and tried to explain that behaviour - its a bit tricky.
You may try it yourself. Just delete the index i in the names of your variables and you'll see that the sheet still is working OK.
Nevertheless I'd prefer the way I have shown in the sheet I posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I appreciate your efforts and I see the worksheet you repaired is working just fine. When I compare it to my original that is not working I see no difference though.
I guess I'm dense because I'm just not getting it ... If I "Just delete the index i in the names of your variables and you'll see that the sheet still is working OK" then it does work fine but for only one value, not for the vector range i.
I'll continue to examine this for a bit and see if I can figure out what you are doing. Any more tips would also be appreciated ... maybe the steps you took to repair the original?
Thanks,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Paul Leopard wrote:
I appreciate your efforts and I see the worksheet you repaired is working just fine. When I compare it to my original that is not working I see no difference though.
There is a difference. As Werner mentioned, your 'Good sheet' worked because of a tricky, undocumented "feature". When you define a range and use inline evaluation like i:=0..3= , the range i is converted to a vector.
Try deleting the inline definition and see what happens.
In Werners sheet he have defined XT using a vector index. Type XT[i and see what happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe reading through the documents posted here might help with you understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Boom! Yes that works ... I get it now.
Thanks guys,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Super
