How to create this matrix without hardcoding the values

3 views (last 30 days)
13 -1 5
-22 10 -87
  6 Comments
Tyrel Cadogan
Tyrel Cadogan on 3 Feb 2019
Yes no problem. They are much simpler ways of taking the same approach but i was just curious to see if there really was a function in matlab where i can create the matrix without hardcoding. I guess there isnt but thanks alot .
Tyrel Cadogan
Tyrel Cadogan on 3 Feb 2019
I appologise if you i have done any wrong. Thanks again.

Sign in to comment.

Accepted Answer

the cyclist
the cyclist on 3 Feb 2019
Edited: the cyclist on 3 Feb 2019
Here is one way.
r = [ 1.5355 + 0.0000i
-1.0914 + 1.0781i
-1.0914 - 1.0781i
0.3621 + 1.3117i
0.3621 - 1.3117i]';
p = reshape(round(13*poly(r)),[3 2])';

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!