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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Matrix Size

MikeArmstrong
5-Regular Member

Matrix Size

Hi

Is there a way of automatically sizing a matrix depending on a previous answer?

I have attached a sheet to help explain.

Regards


Mike
15 REPLIES 15

Mike, see attach.
Viktor Korobov
Viktor

That works great thanks.

Is there a option of making the placeholders inside the matrix blank?

Ready for input values.

Regards

Mike

>Is there a option of making the placeholders inside the matrix blank ?<<br> __________________________

If you mean blank some elements in the array, or a range of elements in almost all sort of soup, answer is "easy" ... address the blanking tool "

Can't read your work *.XMCD, I'm 11
Use the function Replace(M,A,r,c)
M is the array as you create, A is the "replacing object" starting @ r = row, c = col

jmG
MikeArmstrong
5-Regular Member
(To:ptc-1368288)

Yes sorry about my wording i did mean that.

I have attached a copy in M11 format

Regards

Mike

On 7/9/2009 11:37:34 AM, Armo wrote:
>Yes sorry about my wording i
>did mean that.
>
>I have attached a copy in M11
>format
>
>Regards
>
>Mike
______________________________

I think, don't understand what you are trying to do in your Matrix 2 .
Does the attached suggests more ?

jmG



MikeArmstrong
5-Regular Member
(To:ptc-1368288)

Cheers for the response lads, it sounds silly but i wanted the input of matrix to indicate the number of inputs from a given value above.

Maybe the best thing to do is keep it simple.

Regards

Mike

The best is to supply a real example. Mathcad builds about anything it needs, either directly or resulting from kernel operations like in many cases of programmed applications.

jmG
MikeArmstrong
5-Regular Member
(To:ptc-1368288)

I have attached a copy of what i am trying to do any suggestions will be welcomed.

Due to the way my calculation now works, if the number of courses change due to a change in plate height or any other input parameter changing then the number of course change.

But because this is an input the user will have to manually change the matrix and increase/decrease the number of rows to match the No.course calculated above.


Regards

Mike

Any particular reason for wanting to use an array constructor for input rather than the Excel table you had in your previous sheet? Array constructors are rather clumsy input devices anyway, and quite inconvenient to change their sizes.
__________________
� � � � Tom Gutman
MikeArmstrong
5-Regular Member
(To:TomGutman)

Not really only for convenience and the problem with Excel files embedded in Mathcad documents.

I would still have the same problem if I used an excel component, the user would still be required to change the number of row�s etc.

Regards

Mike

What problems with Excel components in Mathcad sheets?

The size problem in Excel is quite different -- Excel provides an infinite (not quite, but for this purpose effectively) supply of rows, and the user just uses as many, or as few, as are needed. In your original sheet it is quite clear where to enter data, as the user just matches the amount of data already presented in the sheet (the lower limits).

Mathcad provides a fixed number of slots, which the user must fill. If you really think that to be useful, you could modify the variable definition component to generate the desired assignment. It could provide a specified size array constructor (the code for generating array constructors is already in there, albeit in a somewhat different context).
__________________
� � � � Tom Gutman

>But because this is an input the user will have to manually change the matrix and increase/decrease the number of rows to match the No.course calculated above.<<br> ____________________________

It seems it belongs to your previous API tank design. A very long work sheet from recollection. My understanding from the above wording stops here in the attached, not seeing more from version 14. You should provide a short example of what you want to do and save 11 for much larger audience.

jmG
MikeArmstrong
5-Regular Member
(To:ptc-1368288)

jmG

I have attached a Mathcad 11 file with instructions on the sheet of what i was trying to do.

All i wanted the user to do was fill the placeholders not change the matrix.

Regards

Mike

On 7/10/2009 11:12:37 AM, Armo wrote:
>jmG
>
>I have attached a Mathcad 11
>file with instructions on the
>sheet of what i was trying to
>do.
>
>All i wanted the user to do
>was fill the placeholders not
>change the matrix.
>
>Regards
>
>Mike
______________________________

You don't have to fill any place holder, they fill by themselves as you address them from no previous construct.

jmG

Nothing simple. Actual matrices can be easily constructed for any size (that is what Victor has done). But that is not what you want. What you want is an array constructor, an input structure rather than a display. The only way you can change the size of an array constructor is through the insert array dialog or by going in with a component and modifying the XML.

I suggest that array constructors are not a good way of handling variable size input. Use a component. Input tables, Excel components, multiline text boxes, all are viable options.
__________________
� � � � Tom Gutman
Top Tags