Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Stack of Element of matrix

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-02-2020
06:09 AM

09-02-2020
06:09 AM

Dear all

1.When i substitute all variables results of y(i,x) matrix in matrix and hard to plot, How can plot y(i,x) ?

2.After I can not do 1 above I try to manual by stack but Results still Matrix in matrix,Can we automatic stack the element of matrix y(i,x) (red circle in attachment) ?

3.Or you can revise my technique to better and easy?

thank you

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
08:42 AM

09-03-2020
08:42 AM

Here is a variant that tries to suppress the vertical line segments between the parabolic segments.

14 REPLIES 14

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-02-2020
09:52 AM

09-02-2020
09:52 AM

Re: Stack of Element of matrix

Hi,

There are predefined functions stack() and augment().

Look them up in help as they are pretty self explanatory.

Cheers

Terry

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-02-2020
09:58 AM

09-02-2020
09:58 AM

Re: Stack of Element of matrix

Can you plot the function y(i,x) ? Without user input one by one

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-02-2020
10:20 AM

09-02-2020
10:20 AM

Re: Stack of Element of matrix

1) What you get are not pure vectors or matrices because you mix ranges (i) and vectors

2)a) Whats the reason for defining vectors with three times the same value

2)b) What kind of plot do you expect with all values being the same?

3) It looks to me that you are not aware the when you define

you are already defining a nested vector

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-02-2020
11:21 PM

09-02-2020
11:21 PM

Re: Stack of Element of matrix

Dear Werner_E

After I remove i (iteration) it still be nest matrix.

My purpose i wanna construct Parabolic Equation continue (n metric) y=a(x-h)^2+k in single matrix and then we can do matrix operation.

Thank you

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
02:44 AM

09-03-2020
02:44 AM

Re: Stack of Element of matrix

Not sure, but if the goal is to plot a periodic function, you may use the "mod" function to do the job:

Prime 6 sheet attached

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
02:51 AM

09-03-2020
02:51 AM

Re: Stack of Element of matrix

Thank u Werner_E

But L have different length L1#L2#L3#...#Ln

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
05:48 AM

09-03-2020
05:48 AM

Re: Stack of Element of matrix

Your L-values were all the same in your initial sheet!

Maybe something like the attached could help?

Personally I prefer programs and functions over vectors and ranges on worksheet level.

Prime 6 sheet attached

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
05:57 AM

09-03-2020
05:57 AM

Re: Stack of Element of matrix

Thank u

it relate to L,t,y1,x1,k,h are matrices

I will test your sheet i will return ask more if not working

Thank you for your help

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
06:03 AM

09-03-2020
06:03 AM

Re: Stack of Element of matrix

You never used "t" in your initial sheet.

Furthermore - if you wanted to work with individual and different values of "y" and "k" for each parabola, you should have used different values in the first place.

My program assumes the same upper and lower values (y and k) for each parabola, but the program could be easily adapted - you simply would use "idx" to chose the correct value for each parabola.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
06:25 AM

09-03-2020
06:25 AM

Re: Stack of Element of matrix

Please Could you do for me? Werner

Thank you

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
08:28 AM

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
08:42 AM

09-03-2020
08:42 AM

Here is a variant that tries to suppress the vertical line segments between the parabolic segments.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-03-2020
10:01 PM

09-03-2020
10:01 PM

Re: Stack of Element of matrix

I try to add matrix x and h but not working

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-04-2020
03:56 AM

09-04-2020
03:56 AM

Re: Stack of Element of matrix

.) Your modified function is constant as the argument x (of f(x)) is never used. So the graph would be a horizontal line.

.) Not sure but it looks to me that the plot area is a bit higher than the definition of the range x

.) defining the range x for plotting overwrites the three element vector x you defined at the top. I have no idea what you think that this vector is supposed to do.

.) you again have vectors with all the same values. For testing purposes you should use different values if this is mandatory, otherwise use a simple variable with the one and only value.

.) your vector h does not make any sense, just use L1/2 in the program. Didn't you notice the the first step in the program creates a vector h? This will overwrite your vector h anyway!