Indexing again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Indexing again
Hello To All,
A few of you were really helpful in pinning down my indexing problem. In the attached is part of what I have been working on in the background. Please do not get too hung up on what the overall picture is or anything until the end of the sheet, you will see that I have created a couple of tables toward the end of values and have integrated between two sets of values (column 1 of each table with matrix Z(I) to get some areas and then have integrated these areas to get a volume. I now want to do this in terms of j I.e. get 5 volumes to account for each column of the tables. Any ideas where I am going wrong?
Thanks,
Andy.
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You create a 2D array b, then try to address it as a single dimension vector:
If you do the interpolation against the whole column "cntrl-shift-c", things work better:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
PS I am using MCPrime 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You create a 2D array b, then try to address it as a single dimension vector:
If you do the interpolation against the whole column "cntrl-shift-c", things work better:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Many Thanks Fred!
So as each is a column in the b matrix that makes allot of sense!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Fred,
any idea where I am going wrong in the attached? I am now trying to do the same thing again but as a function. I think the problem is now the same (my lack of understanding of the dimensions of what I am doing). Any help welcomed.
Thanks,
Andy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You must have an integer for an array index phi = ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So everything to this point seems to be working but this specific operation is not happy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The function b(I,phi) does not create a vector, so the linterp in Area_b fails. See attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Fred,
Out of interest, why does the linterp for Wl(x,i,Phi) work without a vector but not the Area linterp?
Thanks,
Andy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> why does the linterp for Wl(x,i,Phi) work without a vector
Why do you think it does?
ww(i, phi) is a 2 x 2 matrix and you use the first resp. second column of that matrix as arguments for linterp. Those columns ARE vectors (with two elements each).
