Turn on suggestions

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

Showing results for

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

Showing results for

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

Apr 30, 2019
02:38 AM

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

Apr 30, 2019
02:38 AM

Symbolic matrix construction

I try to create a symbolic matrix (in my example, the matrix RES ).

The problem is that I cannot have the result in the form of a matrix, the only way to obtain what I want is to say that RES is not a matrix and is depending on two others variables corresponding to the indexes of the "matrix" (RES2 solution in the attached file question.xmcd). However, I need to use this result after and I need to have the result in the form of matrix.

How can I do to obtain my result in the form of a matrix ?

Thanks !

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Apr 30, 2019
05:43 AM

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

Apr 30, 2019
05:43 AM

Hi,

You cannot index a function at its definition. Mathcad is looking for the name of a variable to index.

The second function definition does work as it does a number of summations that return a single value as a result of the function.

You can define a matrix that uses this function. Is this what you are after?

Warning. by default Mathcad indexes matrices from 0,0 unless you redefine ORIGIN worksheet variable.

Cheers

Terry

9 REPLIES 9

Apr 30, 2019
05:43 AM

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

Apr 30, 2019
05:43 AM

Hi,

You cannot index a function at its definition. Mathcad is looking for the name of a variable to index.

The second function definition does work as it does a number of summations that return a single value as a result of the function.

You can define a matrix that uses this function. Is this what you are after?

Warning. by default Mathcad indexes matrices from 0,0 unless you redefine ORIGIN worksheet variable.

Cheers

Terry

Apr 30, 2019
05:53 AM

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

Apr 30, 2019
05:53 AM

Thanks for your response !

Apr 30, 2019
07:03 AM

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

Apr 30, 2019
07:03 AM

Hi,

The answer would not be complete now we know the intent.

You can define the matrix with a quicker notation using the values of r and s you defined.

In this case a name is used in the definition so you can use indexes

Remember by default matrices start at index zero.

Cheers

Terry

Apr 30, 2019
07:32 AM

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

Apr 30, 2019
07:32 AM

Hi,

This is exactly what I wanted, thanks !

But I still have a question, if I want to keep U and V as symbolic variable, the only way to obtain the matrix is to create each component "manually" as in your previous response ?

Thanks

JUF

Apr 30, 2019
08:32 AM

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

Apr 30, 2019
08:32 AM

Hi,

Not sure I understand your question.

U and V are variables in scope for the function RES2 definition.

V is also a variable in scope for function MAT2 definition.

I don't want to call them symbolics as this has another description in symbolic arithmetic.

U and V in definition for RES2 are set to the values 10 and 31 only in the definition of the final matrix in one statement.

Apr 30, 2019
09:11 AM

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

Apr 30, 2019
09:11 AM

Hi,

I want to have this :

where MAT(U,V) is a matrix (of function) and U and V are variables in scope for the MAT function. After, I will used this matrix for different values of U and V but for now I want keep U and V as vrariables.

My question is : can I do something like the print screen below?

Or do I need to define each component of the matrix MAT as it's done in the previous printscreen ?

Apr 30, 2019
09:15 AM

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

Apr 30, 2019
09:15 AM

(There is the reply with printscreens, sorry)

Hi,

I want to have this :

where MAT(U,V) is a matrix (of function) and U and V are variables in scope for the MAT function. After, I will used this matrix for different values of U and V but for now I want keep U and V as vrariables.

My question is : can I do something like the print screen below?

Or do I need to define each component of the matrix MAT as it's done in the previous printscreen ?

Apr 30, 2019
09:50 AM

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

Apr 30, 2019
09:50 AM

Hi,

You cannot do this as Mathcad will not let you define a function with index values.

You either do as in your matrix method which gets cumbersome with big matrices..

Or use a small program to get around it.

Cheers

Terry

Apr 30, 2019
09:58 AM

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

Apr 30, 2019
09:58 AM

Hi,

The solution with the for loop works perfectly !

Thanks a lot Terry, It's really helpful.

Cheers,

Julian