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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Saving symbolic result to variable for future use.

AB_8746171
3-Newcomer

Saving symbolic result to variable for future use.

Hi,

I do problems that produce a square matrix in the s domain multiplied by a vector this is equal to a driver vector (circuit analysis).  I build a matrix with constants R,C,L and s as the complex frequency.  I invert this matrix and multiply by vector.  I use symbolics to generate the vector.  I then copy this result manually to a function and do my calculations in the s domain.  

 

My problem is the copy and paste.  If I change something in the matrix (add a resistor) then it changes and I have to manually repeat the copy and paste.

 

Is there a way to do this automatically.  

 

I'm using 7.0 version now.

 

Thanks for the help

Andy

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:AB_8746171)

You should never resort to copy and paste but rather assign the results of a symbolic evaluation to a function or a variable and use that for further calculations.

Here are two simple examples

Werner_E_0-1675625959599.png

 

Werner_E_2-1675626061168.png

 

Note that the results in the first example (which where assigned to variables) can only be used in symbolic evaluations (because a and b were unknown), while in the second example the function created can be used numerically as well.

 

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:AB_8746171)

You should never resort to copy and paste but rather assign the results of a symbolic evaluation to a function or a variable and use that for further calculations.

Here are two simple examples

Werner_E_0-1675625959599.png

 

Werner_E_2-1675626061168.png

 

Note that the results in the first example (which where assigned to variables) can only be used in symbolic evaluations (because a and b were unknown), while in the second example the function created can be used numerically as well.

 

I feel silly.

AB_8746171_0-1675625959028.png

Thanks alot!

Andy

 

Asking questions is usually not silly, but rather is the way we learn. And Werner is an excellent teacher!

Werner_E
25-Diamond I
(To:AB_8746171)


@AB_8746171 wrote:

I feel silly.


There is absolutely no reason for doing so!

Announcements

Top Tags