Libraries equivalent for referenced subsystems

6 views (last 30 days)
Adrian Cristian
Adrian Cristian on 5 Apr 2022
Commented: Adrian Cristian on 11 Apr 2022
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;

Answers (1)

Fangjun Jiang
Fangjun Jiang on 6 Apr 2022
The library option in find_system()
'FollowLinks', 'on' or 'off'
'LookInsideSubsystemReference', 'on' or 'off'
See doc of find_system
Adrian Cristian
Adrian Cristian on 11 Apr 2022
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!