Borrar filtros
Borrar filtros

Help use unassigned variables in matlab

3 visualizaciones (últimos 30 días)
Andrew Roehr
Andrew Roehr el 5 de Mayo de 2021
Comentada: Andrew Roehr el 17 de Mayo de 2021
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 comentario
Andrew Roehr
Andrew Roehr el 5 de Mayo de 2021
I tried the sym command but it doesn't allow me to use the pole placement command

Iniciar sesión para comentar.

Respuesta aceptada

Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni el 10 de Mayo de 2021
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 comentario
Andrew Roehr
Andrew Roehr el 17 de Mayo de 2021
Thank you for taking the time to answering my question!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by