How to load bus data to simulink using from file block

3 ビュー (過去 30 日間)
Shiqi Duan
Shiqi Duan 2018 年 10 月 26 日
コメント済み: Shiqi Duan 2018 年 11 月 1 日
clc
clear
close all
load('source_data.mat');
source_data_bus.As = timeseries(As,t);
source_data_bus.Es = timeseries(As,t);
source_data_bus.route_x = timeseries(route(:,1),t);
source_data_bus.route_y = timeseries(route(:,2),t);
save('source_data_bus','-v7.3','source_data_bus')
Hello, would anyone please tell me how to load bus data to simulink using a From File block? I read many tutorials but still don't know how to do it. I drag a From File block, set the name of my mat file, but I don't know how to set the output data type.

回答 (1 件)

Haritha
Haritha 2018 年 10 月 27 日
Hi,
In two ways it's possible to load bus data.
1. Load the variable to workspace , use from workspace block and change the variable name same as workspace variable name.
2. Create a call back for bus data by using model explorer option in Simulink.
  1 件のコメント
Shiqi Duan
Shiqi Duan 2018 年 11 月 1 日
I'll try this, thanks for your reply.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSources についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by