cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

MATRIX Caclulation help

ppal
14-Alexandrite

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
StuartBruff
23-Emerald I
(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?

 

2021 12 06 a.png

 

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.   

 

2021 12 06 b.png

 

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

 

Stuart

 

 

View solution in original post

5 REPLIES 5
Werner_E
24-Ruby IV
(To:ppal)

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

Werner_E_0-1638759898183.png

 

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=

Werner_E_1-1638760068244.png

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.

 

ppal
14-Alexandrite
(To:Werner_E)

Hi

Was not my intention to create zero . I simply wanted to sample every
second item.
StuartBruff
23-Emerald I
(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?

 

2021 12 06 a.png

 

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.   

 

2021 12 06 b.png

 

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

 

Stuart

 

 

View solution in original post

Werner_E
24-Ruby IV
(To:ppal)

Woiuld something like the following help?

Werner_E_0-1638769051251.png

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:

Werner_E_1-1638769164491.png

 

 

Hi,

You missed a subscript

Capture.JPG

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."