cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

MC 15 Question: Vector accessing

aguter
1-Newbie

MC 15 Question: Vector accessing

Hello,

I was wondering why when I define a counter variable like "i" and assign it to a vector the result display a "..." and not the actual value I just assigned to the vector.

It is a little annoying to have to type out the variable again to display the value, I would like it to display correctly without having to retype the variable.

See below:

Capture.PNG

8 REPLIES 8
Werner_E
24-Ruby V
(To:aguter)

Thats funny - I had never noticed that effect but I can confirm it in Mathcad 15 M030.

It only ocurs if the index is a variable. It works as it should if the index is a constant.

I would call it a bug.

BTW, it works as it should in Prime3

Werner_E
24-Ruby V
(To:aguter)

There is a workaround using symbolic evaluation which might not be applicable in all situations - especially when using units. But you may give it a try.

Which of course is a symbolic eval

disguised as a numeric one (right click menu)

One question at last: Whats the reason you want to see the assigned value immediately after the assignment a second time duplicated?

Regards Werner

RichardJ
19-Tanzanite
(To:Werner_E)

One question at last: Whats the reason you want to see the assigned value immediately after the assignment a second time duplicated?

This example (which your symbolic trick will not fix) may be better:

Richard Jackson wrote:

One question at last: Whats the reason you want to see the assigned value immediately after the assignment a second time duplicated?

This example (which your symbolic trick will not fix) may be better:

We can expand that symbolic trick to some extent (but we sure can find examples where we are left without a suitable workaround) and Austin has to decide if its worth the effort.

In my opinion the price is too high compared to what we gain. We need to figure out the correct substitution for every occurrence and then we may run into accuracy problems because of the use of the float keyword. So it may be funny to play around with that trick, but is nothing for the everyday business. Personally I would prefer the separation of assignment and evaluation anyway, no matter if the inline eval would do what it should do or not.

Thats the way it can be done by additionally hiding the keywords

RichardJ
19-Tanzanite
(To:Werner_E)

In my opinion the price is too high compared to what we gain.

Agreed. And we have seen other bugs and problems associated with inline evaluation, so I never use it. An assignment followed by an evaluation is always reliable. I know that for some people the inline evaluation is dictated by engineering standards, but unless someone has a need to conform to such standards then IMO it's best avoided.

RichardJ
19-Tanzanite
(To:aguter)

I don't know why it's displayed that way. I agree that it's somewhat annoying, but I don't know of a way to change it.

aguter
1-Newbie
(To:aguter)

Thanks everyone for the responses, I have decided it is not worth the effort to try to fix, I will just deal with the repetiveness of the situation.

The example posted by Richard Jackson correctly describes why I would like the solution shown, Test=F/V=... does not tell me much. My example was a simple one to show the issue.

Fred_Kohlhepp
23-Emerald I
(To:aguter)

By assigning a subscript you're creating a vector:

Top Tags