output files written at particular times and sampling time problems

1 view (last 30 days)
Hello,
I am modelling a system in simulink with large excel sheet as input. I have few questions:
  1. The first column of the data excel field represent the time, 1 row for 1 hour. I have first used a function to read the file, in which I ask the model to read 1 row for 3600 seconds. But I have seen that one can use spreadsheet. What is the better way?
  2. I use variable time step for all the model, so the resulting file (I have written a script in matlab to put the results into an excel file) is very big and time is like (1.24 2.38 3.6...) , I mean, it's not written every second; so I tried to change this and in the output pad in the configuration panel, I put the option to write output at specific values only, every 300 seconds (for this I put 300*(1:8928), to cover one month), but doing this it takes too much time (many hours ...). Is there another way to deal with that? Moreover, I would like to write the results every second so I could do a media on the 300seconds through excel....but already every 300 seconds takes hours and hours.....
I am sorry if these questions have already been mentioned, I have done so many research in the forum these days, but I couldn't find anwers to that.
I have never used files of input/output before.
And I also meet problems with the spreadsheet way, where I define a sampling time of 3600s and give me problems because the rest of the model is continuous.
I would really be happy for any help or at least, some hints... In particular, could someone help me understand this sampling time, personnally, I haven't a lot of experience with Matlab/Simulink, and the help is really confusing for understanding
Thank you
Christine

Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!