Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
is it possible to detect the end of file (and stop output) using a 'from-file' block?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
My model requires a calibration run before processing real data. It would be very convenient to be able to read in a calibration file which could be terminated at the end, and then switch to the real input data. This cannot be done in separate steps, the calibration must be done immediately preceding the data. These are both matrix formatted time stamped data files. I am using Matlab R2015a.
5 commentaires
Walter Roberson
le 29 Nov 2016
Imagine that you had a "Next Input Sample" subsystem, and that subsystem had two or more "From-File" blocks (or equivalent), and that the subsystem was built to automatically get the next available sample from the "current" file and automatically switch to the next file when it hit the end of the first. The remainder of the model does not know which file is the "active" file.
Now, would such a hypothetical sub-system work for your purposes?
The alternative is that once the end of the first file is reached, that a control signal needs to be asserted to notify the rest of the model that you are switching out of calibration phase because the rest of the model needs to do something slightly different. An example of this would be a situation in which a Neural Network had to be instructed to switch out of training mode and enter pure classification (or prediction) mode.
Réponses (1)
KSSV
le 29 Nov 2016
That is not a deal.....you first read the file, pick your required data from the file and then do what you want. There are many ways to read a file, it depends on how your file is. Read below for the possible functions:
3 commentaires
Cette question est clôturée.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!