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

Saving symbolic result to variable for future use.

AB_8746171
3-Visitor

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

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

 

rgunwaldsen
14-Alexandrite
(To:AB_8746171)

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


@AB_8746171 wrote:

I feel silly.


There is absolutely no reason for doing so!

Top Tags