How to create this matrix without hardcoding the values

3 次查看(过去 30 天)
13 -1 5
-22 10 -87
  6 个评论
Tyrel Cadogan
Tyrel Cadogan 2019-2-3
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 .

请先登录,再进行评论。

采纳的回答

the cyclist
the cyclist 2019-2-3
编辑:the cyclist 2019-2-3
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])';

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by