How to access RAM object/Data store from Matlab function on simulink ?

Hi. I am trying to create a simple time-series data processing system on simulink. Source is a real value with double data type. It is sent to a data storage such as RAM/Data store at 1msec samping time. What I want to do is extract 1000 sampled data from the storage at 1 second interval,1000 msec, from matlab function and use these data for further processing in a [1,1000] array fromat in the function. I tried this but didn't work like the number of element is mismatched between source and storage. Global variable can share the data between objects but not in an array format etc. I am using most of simulink blocks and a part of blocks in a HDL coder.
These look simple but for me it is a barrier to implement the sysmtem. The following is what I think to solve for my implementation.
#1: Effective way of storing time-series data to storage.
#2: Extract data from the storage/object block on simulink and use it in an array format in matlab function on simulink.
If someone tells me how to do this, it would be very much appreciated for your help.

1 Kommentar

TM
TM am 5 Jul. 2021
Bearbeitet: TM am 5 Jul. 2021
This has been resolved by myself. The solution needs to use a combination of simlink signal object , global variable in Matlab Function, and a selector. It works as expected. So, forget about my question.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Version

R2020b

Gefragt:

TM
am 26 Jun. 2021

Bearbeitet:

TM
am 5 Jul. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by