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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

MATRIX Caclulation help

ppal
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
StuartBruff
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?

 

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 V
(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
17-Peridot
(To:Werner_E)

Hi

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

 

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

 

 

Werner_E
24-Ruby V
(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

Top Tags