MATLAB Matlab: Converting a vector to syms?

  • Thread starter Thread starter skybox
  • Start date Start date
  • Tags Tags
    Matlab Vector
AI Thread Summary
In the discussion, a user seeks assistance in MATLAB for converting a vector, specifically Z = [2 3], into a polynomial expression represented as (Z-2)*(Z+3). They express difficulty finding a built-in function to achieve this and mention the possibility of needing to create a custom function. Another participant clarifies that the polynomial (Z-2)*(Z+3) corresponds to the coefficients [1 1 -6], highlighting a distinction between the polynomial and the original vector. The conversation emphasizes the challenge of symbolic computation in MATLAB.
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
5
Views
3K
Replies
4
Views
3K
Replies
1
Views
2K
Replies
32
Views
4K
Replies
4
Views
1K
Replies
1
Views
2K
Replies
6
Views
2K
Back
Top