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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

17-Peridot

## MATRIX Caclulation help

Mathcad prime 7. Problems on Page 9

Answers not as expected. Probably issues on how I did the subscripts.

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald II
(To:ppal)

@ppal wrote:
Hi

Was not my intention to create zero . I simply wanted to sample every
second item.

Try something like the following, perhaps?

Although, if I had Prime, I'd probably program a function to do the sampling.

As I've only got Express, I'll have to define a recursive function to do the job.

I've woken up far too early, so I'm sure there are better ways to do it ...

Stuart

5 REPLIES 5
24-Ruby V
(To:ppal)

You forgot a vector index "i" when you defined Eqn.3

Are you aware that all your vectors have every second value set to zero?

You don't see this when you type A[i= but you can see it when you simply type A=

The reason is that you defined the range "i" which you use to create all your vectors with a step width of 2. That way only elements with even index are created by your calculations and vector elements with odd index are automatically set to zero. Not sure if thats really what you intended.

17-Peridot
(To:Werner_E)
Hi

Was not my intention to create zero . I simply wanted to sample every
second item.
23-Emerald II
(To:ppal)

@ppal wrote:
Hi

Was not my intention to create zero . I simply wanted to sample every
second item.

Try something like the following, perhaps?

Although, if I had Prime, I'd probably program a function to do the sampling.

As I've only got Express, I'll have to define a recursive function to do the job.

I've woken up far too early, so I'm sure there are better ways to do it ...

Stuart

24-Ruby V
(To:ppal)

Woiuld something like the following help?

BTW, when working with the vector its not necessary to ue the index in all cases - use the whole vectors instead. Furthermore I would suggest to also use the time information, too:

21-Topaz I
(To:ppal)

Hi,

You missed a subscript

Announcements
Top Tags