Azzera filtri
Azzera filtri

Simulink from file for interpolation in MATLAB function

3 visualizzazioni (ultimi 30 giorni)
Josh
Josh il 2 Ago 2019
Risposto: Josh il 2 Ago 2019
Hello,
I am trying to interpolate data from a table in Simulink using the MATLAB function block. The data table is not time dependent, but I want the table to be read every time step.
I am using the From File block to load a .mat file that contains 3 columns. Column 1 and 2 are the X and Y input and Column 3 is the function result. At each time step I want to read X and Y from simulink, interpolate the 3d table, and output the function value.
When I load the table into my the MATLAB function block, only the third column is availible, since the function block assumes this is a time series with the first row being the time. But I want the whole table to be availible at any time step. I could hard code the table into the function or define three .mat input files, but neither of these are my preffered solution. Any advice would be appreciated.
Thanks

Risposte (1)

Josh
Josh il 2 Ago 2019
Well it looks like I can't use griddata anyway, so this probably won't work.

Categorie

Scopri di più su Simulink Functions 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!

Translated by