How to change storage class

Hi I have a data dictionary with Autosar4.signal, I need to change their storage class from global to Exported global from script. I am trying to use this script but it s giving me this error.
Script: load_system('xxxxxxxSWC');
Obj = getSection(myDictionaryObj,'Design Data');
paramEntries = find(dDataSectObj,'-value','-class','AUTOSAR4.Signal');
for i = 1:length(paramEntries);
set_param(paramEntries(i),'StorageClass','ExportedGlobal') end
ERROR : The first input to set_param must be of type 'double' or 'char'.

4 comentarios

jonas
jonas el 19 de Sept. de 2018
Would have been convenient to include the class of paramEntries in the question
whos paramEntries
GIRIDHAR ASV
GIRIDHAR ASV el 20 de Sept. de 2018
I added paramEntries to just check the list of the signals with class Autosar4.signal.I got 13 signals.So i tried to keep a for loop and access each of 13 signals.I dont know if this is the correct way of doing it.
jonas
jonas el 20 de Sept. de 2018
Me neither, because I still don't know the class of paramEntries. Can you paste the result of
whos paramEntries
?
GIRIDHAR ASV
GIRIDHAR ASV el 21 de Sept. de 2018
whos paramEntries Name Size Bytes Class Attributes
paramEntries 13x1 208 Simulink.data.dictionary.Entry

Iniciar sesión para comentar.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 21 de Sept. de 2018

0 votos

use get() and set(), instead of get_param() and set_param()

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Sept. de 2018

Respondida:

el 21 de Sept. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by