- Highlight the signal path in the model.
- Highlight any block in the model, including blocks that are not on the signal path.
- Create a directed graph plot of the signal path.
How to modify the sltrace.Graph objects? I want to delete an element of the DstBlocks array
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello dear Community,
I would like to delete a block from the DstBlock path. I am using sltrace function and the resulting sltrace.Graph is to be by the user modified. I have read that you have to use "set" and "get" methods because they are property values but I have not been succesful to modify anything. From Matlab help I see that set function can be used like this: set(object, property, value)
I am programming the following line to modify the Trace Path in this case I want to modify the Destination Blocks ( DstBlocks array):
test1 = sltrace(element, 'Destination', 'TraceAll','on');
set(test1.DstBlocks(1), "Value", [ ]);
I am trying here to delete/ modify the value of the first (1) object of the resulting array DstBlock of the resulting Trace Path (test1). What woudl be the correct function to use or the correct sintax if the function set is to be used? Thank you.
0 Kommentare
Antworten (1)
Poorna
am 21 Apr. 2024
Hi Jose Manuel,
I see you want to delete the 'DstBlocks(1)' of 'test1' which is an ouptut of the "sltrace" function. It is to be noted that "sltrace" is an analysis function, which means it is to analyze the signal paths of the model but not a modification tool to modify the signals/connections/blocks within the model. As mentioned in the official documentation of the "sltrace.graph" object, you can use the "sltrace.graph" object to do the following:
If you instead want to modify the simulink model programmatically by adding/deleting lines, blocks etc. You can refer to the following documentation which lists the functions available to programmatically modify a simulink model:
To know more about the "sltrace" funtion, refer to the following documentation:
Hope this Helps!
2 Kommentare
Siehe auch
Kategorien
Mehr zu Inputs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!