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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Operations on Nested Matrix

EricHong
1-Newbie

Operations on Nested Matrix

I created a set of equations that calculates the positions of the two masses with a couple of springs: one to the ground and another between them.  The result looks reasonable as it shows below:

Now I am actually performing a tolerance analysis and there are 18 different conditions in a 9x2 matrix.  I vectorized all statements and got as far as it shows below:

Rightfully so, each element in the vector has 9x2 matrix nested.  How do I access a particular vector corresponding to a condition?  For example, how do I plot one vector or all vectors?

15 REPLIES 15

MMM.png

Thank you for your response.  I am still having hard time to apply what you taught me to my problem.

For example, I want to use the first condition [0,0 in the 9x2 matrix.

I need to get the [0,0 element from the 9x2 matrix at each 0.001 sec time increment or at every index of the resulting vector.  It almost then sounds like I need to do a looping on it.

Is that right?

Send pls the sheet

Here it is

sorry, too late - the answer tomorrow morning....

Thank you regardless.

RichardJ
19-Tanzanite
(To:EricHong)

What are are looking at is not a nested vector. t is a range variables, so your result is an output table showing the result of the calculation for each value of t. Each value is a 9 by 2 matrix. The attached worksheet shows how to actually create the nested vector. You can display elements of that by indexing into it in the way Valery showed. However, when you do that it becomes clear that you are not getting what you hoped for. Vectorization does not always work the way you expect, and vectorizing every dependent function is a good way to get the unexpected! You need to step through the functions one at a time, checking what each one returns, until you find the point where it goes wrong.

I may look at it more later, but whereas it's past Valery's bedtime, it's past my dinner time

StuartBruff
23-Emerald II
(To:EricHong)

Eric Hong wrote:

Thank you for your response.  I am still having hard time to apply what you taught me to my problem.

For example, I want to use the first condition [0,0 in the 9x2 matrix.

I need to get the [0,0 element from the 9x2 matrix at each 0.001 sec time increment or at every index of the resulting vector.  It almost then sounds like I need to do a looping on it.

Is that right?

Yes.  It's the kind of thing that is normally done within a program or by using an integer index and calculating t from the index.  However, there are a few ways to use a non-integer range variable to assign evaluation results to an array.  I've used one such way in the example below:

Stuart

Holy cow.  Let me try this and get back to you.  Thanks.

RichardJ
19-Tanzanite
(To:EricHong)

I guess Stuart is burning the midnight oil. Or at least by my watch, he will be in one minute

StuartBruff
23-Emerald II
(To:RichardJ)

Richard Jackson wrote:

I guess Stuart is burning the midnight oil. Or at least by my watch, he will be in one minute

Reckon your reckoning might be about right.  I was just about to pack up for the night (as there's not much point in trying to stargaze in my part of Glasgow ... light pollution seems to be de rigeur).  I guess Valery will pick up the morning watch!

Stuart

RichardJ
19-Tanzanite
(To:StuartBruff)

in my part of Glasgow ... light pollution seems to be de rigeur).  I guess Valery will pick up the morning watch!

But if you turned off the lights you wouldn't be able to see the perpetual cloud that stops you from stargazing anyway

My photo of the supermoon eclipse:

Richard Jackson wrote:

in my part of Glasgow ... light pollution seems to be de rigeur).  I guess Valery will pick up the morning watch!

But if you turned off the lights you wouldn't be able to see the perpetual cloud that stops you from stargazing anyway

My photo of the supermoon eclipse:

Many interesting when I have sloped - on the forum and in sky...

I guess Valery will pick up the morning watch!

I have seen morning on Sky

PTC.png

StuartBruff
23-Emerald II
(To:RichardJ)

Richard Jackson wrote:

in my part of Glasgow ... light pollution seems to be de rigeur).  I guess Valery will pick up the morning watch!

But if you turned off the lights you wouldn't be able to see the perpetual cloud that stops you from stargazing anyway

It's a myth.  The cloud (and rain) is only there during summer holidays (covering both Scottish and English school holidays - I mean, that goes without saying, doesn't it?).  And during occasions of aerial interest, such as air shows and astronomical events ... for example, during the partial solar eclipse earlier this year, and all major meteor showers.   Not that it matters too much during summer, as we're further north than Moscow and parts of Alaska, the sky is still blue at 0100 hrs local - just in case!

Glasgow just taunts astronomers, with clear skies that don't show anything less than magnitude 2; even my 8x56 and 15x70 bins don't help that much.  It's almost enough to make me take up Lunar astronomy (I'm a deep sky watcher by preference)

OTOH, there's always radio astronomy. I've got a USB DAB-TV dongle and SDR# software defined radio software, and antenna are easy enough to obtain or build!  (I grew up in Manchester, so if you didn't do radio, you didn't observe; it's no coincidence that radio astronomy is big at Manchester University). It's 25,900 light years to Sagittarius A*, I've got a full bottle of whisky, a copy of Kraus, It's dark, and I'm wearing sunglasses.

My photo of the supermoon eclipse:

...

Nice!

Stuart

Top Tags