How to change storage class

조회 수: 4 (최근 30일)
GIRIDHAR ASV
GIRIDHAR ASV 2018년 9월 19일
답변: Fangjun Jiang 2018년 9월 21일
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
jonas
jonas 2018년 9월 20일
Me neither, because I still don't know the class of paramEntries. Can you paste the result of
whos paramEntries
?
GIRIDHAR ASV
GIRIDHAR ASV 2018년 9월 21일
whos paramEntries Name Size Bytes Class Attributes
paramEntries 13x1 208 Simulink.data.dictionary.Entry

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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2018년 9월 21일
use get() and set(), instead of get_param() and set_param()

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by