Libraries equivalent for referenced subsystems

조회 수: 2(최근 30일)
Adrian Cristian
Adrian Cristian 2022년 4월 5일
댓글: Adrian Cristian 2022년 4월 11일
Hello! In a script I am using, it is present the "all_libs" variable. Do you know a replacement for it to not search libraries but referenced subsystems? I'll leave down the part of the script where I use "all_libs". I used the script in Matlab R2017b to compare scalings from frame to core in an application. There I had libraries to search into, but with the new revisions there are no longer libraries, but referenced subsystems, and the script no longer works. It's like it doesn't recognize the core from the application and can't compare the scalings from frame. If I run it, it starts to work for a few minutes, but it compares the frame signals with something called "i_value" (I don't have anywhere in the code anything named like that) and after that it stops and gives an error. I use Matlab R2020b, TargetLink 5.1p1
all_libs = libinfo(frame_handle);
num_in = [];
num_out = [];
for fi = 1:numel(find_system(bdroot, 'RegExp','on','BlockType','SubSystem','ReferencedSubsystem', '.'))
if contains(all_libs(fi).Library, '_function') || contains(all_libs(fi).Library, '_Funktion')
core_handle = all_libs(fi).Block;


Fangjun Jiang
Fangjun Jiang 2022년 4월 6일
The library option in find_system()
'FollowLinks', 'on' or 'off'
'LookInsideSubsystemReference', 'on' or 'off'
See doc of find_system
  댓글 수: 3
Adrian Cristian
Adrian Cristian 2022년 4월 11일
Eventually I've replaced the IF statement with a FOR. But afterwards, it seems like the script doesn't want to recognize the IF statements. If I put breakpoints on the first line after an IF, it won't stop. I never coded in matlab language so it's very confusing for me. I got this script at work and I have to make it on Matlab R2020b. On Matlab R2017b works, but the applications we have in that contain Libraries, and I think the ones on Matlab R2020b, but have Referenced subsystems instead of normal subsystems.

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

Community Treasure Hunt

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

Start Hunting!

Translated by