How to give time in hours in simulink?

조회 수: 20 (최근 30일)
Muhammad Saqlain Haider
Muhammad Saqlain Haider 2020년 8월 13일
댓글: Walter Roberson 2020년 8월 16일
Hello Everyone
As we know that Simulink runs simulation in seconds but I have a model which I need to run for many days. I wanted to give parameters values on hourly basis in my model as is given in my data but I know that Simulink runs simulation in seconds so any suggestions that How can I give these values in simulink input. I am attaching the image that shows nature of data. I hope you guys will get sense of my question from this data. Time here is in hours so every value
  댓글 수: 4
Walter Roberson
Walter Roberson 2020년 8월 14일
I think so.
Of course the meaning of sin waves or square waves or the like are going to be affected: if you want N simulated samples/second for a generated wave you would have to make it 60*60 times larger to get the appropriate number of samples per hour.
And labels in plots and scopes might say Hz when your intended meaning is samples/unit instead. Cosmetics.
Muhammad Saqlain Haider
Muhammad Saqlain Haider 2020년 8월 14일
Probably you are right but I have doubt on it

댓글을 달려면 로그인하십시오.

답변 (1개)

Jonas
Jonas 2020년 8월 14일
Can you set the sampling time of your model to 3600, such that it calculates once every hour?
  댓글 수: 8
Muhammad Saqlain Haider
Muhammad Saqlain Haider 2020년 8월 16일
Can you eleborate your last answer a little bit. I am sorrry I could not understand that. it will be much appreciated.
Walter Roberson
Walter Roberson 2020년 8월 16일
The idea is that during initialization you could replace the spreadsheet with a different one that had the time multiplied.

댓글을 달려면 로그인하십시오.

카테고리

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

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by