Matlab: Converting a vector to syms?

  • Context: MATLAB 
  • Thread starter Thread starter skybox
  • Start date Start date
  • Tags Tags
    Matlab Vector
Click For Summary
SUMMARY

The discussion focuses on converting a vector in MATLAB, specifically the vector Z = [2 3], into a symbolic expression represented as (Z-2)*(Z+3). Users suggest that while there is no built-in function for this conversion, creating a custom function is a viable solution. It is clarified that the polynomial (Z-2)*(Z+3) corresponds to the coefficients [1 1 -6], not the original vector.

PREREQUISITES
  • Familiarity with MATLAB syntax and functions
  • Understanding of symbolic computation in MATLAB
  • Knowledge of polynomial representation and manipulation
  • Basic programming skills to create custom functions
NEXT STEPS
  • Explore MATLAB's Symbolic Math Toolbox for symbolic computation
  • Learn how to create custom functions in MATLAB
  • Research polynomial manipulation techniques in MATLAB
  • Investigate the use of MATLAB's 'poly' function for polynomial representation
USEFUL FOR

This discussion is beneficial for MATLAB users, particularly those interested in symbolic computation, polynomial manipulation, and custom function creation.

skybox
Messages
37
Reaction score
0
Matlab: Converting a vector to syms??

Hi Guys,

I have a vector in the following form:
Z = [2 3]

I want it to be displayed as (Z-2)*(Z+3). Is there any function in Matlab to do this? I searched help files and don't see any way of achieving this other than a loop.

Thanks in advance for the help!
 
Physics news on Phys.org


I think you have to create your own function for this one. Shouldn't be difficult.
The polynomial (Z-2)*(Z+3) is not equivalent to the vector [2 3] but to [1 1 -6].

But who knows. I'm not familier with symbolic computation.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
6
Views
4K
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K