Help use unassigned variables in matlab

2 次查看(过去 30 天)
Below is a question that I have for control theory in which I am being asked to find a feedback gain K to generate a specific set of eigenvalues.
I have written the code that I would typically use to solve this kind of question if all the values were given but this question is asking me to solve
for the K values for an unspecified frequency. I'm not asking to have the problem solved for me, I am simply wondering if there is a way to create a variable (wo)
and use it within my script without assigning a specific value.
I apologize for lacking the vocabulary to ask the question succinctly, that is why I provided the problem for context.
Thank you for your time and help.
  1 个评论
Andrew Roehr
Andrew Roehr 2021-5-5
I tried the sym command but it doesn't allow me to use the pole placement command

请先登录,再进行评论。

采纳的回答

Shiva Kalyan Diwakaruni
Hi,
The reason of the error is that the input arguments to "place" are not "convertible to floating-point numbers" as "A" and "B" contains symbolic variables. To avoid the error, one could wrap the call to "place" in another symbolic function such that "A" and "B" is conceivably reduced to a floating number. Here is the code that does that:
symplace = @(A,B,P)feval(symengine,'min',A,B,P);
LambdaCC = symfun(symplace(A,B,P));
Hope it helps.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by