MATLAB Answers

How to load matrix variables as constant on Simulink?

조회 수: 7(최근 30일)
관웅 윤
관웅 윤 2021년 8월 26일
댓글: 관웅 윤 2021년 8월 31일
I am trying to load matrix variables on simulink as constant value from '.mat' file. Is it possible to load MATLAB variables on Simulink and use it as constant block value? All variables are N-d array. I found that there are several ways to load a variable on Simulink such as "From File Block" or "Input Port", but It did not work for my project.

채택된 답변

Jonas
Jonas 2021년 8월 26일
Load the .mat file into the Base Workspace of MATLAB, and in Simulink use the From Workspace block to enter the variable name there.
  댓글 수: 3
관웅 윤
관웅 윤 2021년 8월 31일
Wow, It works well. Thank you!!

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

추가 답변(0개)

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by