What is the best way to input xml data to simulink?

조회 수: 24 (최근 30일)
Filippo Catani
Filippo Catani 2017년 4월 4일
편집: Vandana Ravichandran 2017년 4월 12일
I have 3 sensors that output 50 readings per sec through an xml file on http. I can use webread to import the file and a parser to convert text to numbers but then how can I use this as a polling method to import the data in Simulink? Should I convert my input to Simulink.Timeseries? What else? My main problem is that I don't know how to synchronise web readings and Simulink inputs...
Thank you for your help!

답변 (1개)

Vandana Ravichandran
Vandana Ravichandran 2017년 4월 12일
편집: Vandana Ravichandran 2017년 4월 12일
One of the ways to import XML data is to create a Level-2 MATLAB S-Function block that can read/parse an XML file. Refer to the following page that has a detailed answer and example: https://www.mathworks.com/matlabcentral/answers/100555-how-can-i-create-a-simulink-block-that-reads-from-an-xml-file-that-contains-initial-state-conditions

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by