- Extract State Names Before Reduction: Before applying 'minreal', extract and store the names of the states from your original system (linsys1). You can access state names using the 'StateName' property of the state-space system object.
- Compare State Names After Reduction: After applying 'minreal', extract the state names from the reduced system and compare them with the original state names to identify which ones were removed.
Is there a way to display which state are deleted by "minreal"
10 次查看(过去 30 天)
显示 更早的评论
Hi,
Using Linear Analysis Tool, I've obtained a linearization of my model that has 18 states. A structure "linsys1" is created and contains each state's name.
Using minreal to reduce the system, 12 states are deleted.
I've have not a lot of experience yet in linearization and state representation. How can I know the names of states that have been left by the minreal function ?
Thanks
0 个评论
回答(1 个)
Naga
2024-10-23,8:06
Hello Emma,
When you use the 'minreal' function in MATLAB to reduce a state-space model, it simplifies the system by removing uncontrollable and unobservable states. However, 'minreal' itself doesn't directly provide information on which specific states were removed. To determine the states that have been removed, you can follow these steps:
% Assume linsys1 is your original state-space model
originalStateNames = linsys1.StateName;
% Apply minreal to reduce the system
reducedSys = minreal(linsys1);
% Extract state names from the reduced system
reducedStateNames = reducedSys.StateName;
% Find the names of the states that were removed
removedStates = setdiff(originalStateNames, reducedStateNames);
% Display the removed state names
disp('States removed by minreal:');
disp(removedStates);
This method allows you to track which states were eliminated during the reduction process. Make sure that your original system has state names defined; otherwise, this approach won't work as expected.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linearization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!