How to change a global variable name in simulink (containing Data Store Memory)
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Reza Motahari
il 31 Mag 2022
Risposto: Fangjun Jiang
il 31 Mag 2022
Hi everyone.
When I type
open_system([docroot, '/toolbox/simulink/examples/dsm_demo'])
in MATLAB command box, a simulink model opens and fully works. (As you can try)
I changed matlab function inside the model to
function y = fcn
global B;
B = B+1;
y = B;
and renamed data store memory to 'B' (even I clicked on 'refresh')
But after that simulink gives an error as below:
"Data Store Memory block with name 'A' was not found for chart 'MATLAB Function'."
Can anyone help me to find out what's wrong? I'm testing that code to use it in my main project.
0 Commenti
Risposta accettata
Fangjun Jiang
il 31 Mag 2022
On the MATLAB Function block Editor, click "Edit Data" and rename another "A" there.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Best Practices for Simulink Design Verifier Analysis in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!