- Substitute all NaNs with "0"s or something else with relational operator before using/feeding the data to the Simulink model.
- A bit more complicated way is to use logic and bit operators to sort out all NaNs.
How to deal with NaN in 'from spreadsheet' block in Simulink? How do I make Simulink ignore NaNs?
조회 수: 2 (최근 30일)
이전 댓글 표시
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235241/Cadddddddpture.jpeg)
I am using 'from spreadsheet block' from the Simulink library.
The spreadsheet data looks like this
![Captxsure.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235242/Captxsure.jpeg)
While running the model I am getting the following errors:
![5dtrt.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235243/5dtrt.png)
How do I make SIMULINK ignore the NaN values and run the simulation?
댓글 수: 0
답변 (1개)
Sulaymon Eshkabilov
2019년 8월 28일
Hi,
I would suggest to try two different ways:
Good luck
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!