필터 지우기
필터 지우기

Help use unassigned variables in matlab

조회 수: 3 (최근 30일)
Andrew Roehr
Andrew Roehr 2021년 5월 5일
댓글: Andrew Roehr 2021년 5월 17일
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
Shiva Kalyan Diwakaruni 2021년 5월 10일
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.
  댓글 수: 1
Andrew Roehr
Andrew Roehr 2021년 5월 17일
Thank you for taking the time to answering my question!

댓글을 달려면 로그인하십시오.

추가 답변 (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