Azzera filtri
Azzera filtri

How to deal with NaN in 'from spreadsheet' block in Simulink? How do I make Simulink ignore NaNs?

2 visualizzazioni (ultimi 30 giorni)
I have a spreadsheet which has certain 'NaN' values under different variables. This spreadsheet is exported from MATLAB.
I am using the spreadsheet to export values of Irradiance and temperature to a Simulink PV model. The model screenshot is attached:
Cadddddddpture.JPG
I am using 'from spreadsheet block' from the Simulink library.
The spreadsheet data looks like this
Captxsure.JPG
While running the model I am getting the following errors:
5dtrt.png
How do I make SIMULINK ignore the NaN values and run the simulation?

Risposte (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 28 Ago 2019
Hi,
I would suggest to try two different ways:
  1. Substitute all NaNs with "0"s or something else with relational operator before using/feeding the data to the Simulink model.
  2. A bit more complicated way is to use logic and bit operators to sort out all NaNs.
Good luck

Categorie

Scopri di più su Data Import from MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by