필터 지우기
필터 지우기

How to use out block value in matlab

조회 수: 6 (최근 30일)
yogan sganzerla
yogan sganzerla 2017년 3월 21일
댓글: ES 2017년 3월 22일
Hello,
I develop a code and the output is a vector. I am adding a picture that can be easier to understand. I would like to export this vector in MATLAB to plot a graphic. I found this command: plot(x,voltage.signals.values,'linewi',2) I didn't understand how does it work. Could someone help me?

채택된 답변

ES
ES 2017년 3월 22일
1. You can directly add a scope on the line joining the block.
2. You can log the data flowing through the line. At the end of the simulation you can access this data and do a plot. see here http://in.mathworks.com/help/simulink/ug/configuring-a-signal-for-signal-logging.html
  댓글 수: 2
yogan sganzerla
yogan sganzerla 2017년 3월 22일
Sorry, but I think that I didn't explain correctly. I am adding another image from MATLAB As you can see, to plot it's necessary "t" and "voltage.signals.values". The first variable I have. The trouble is the second (voltage.signals.values) because it's from output. I need to link output with voltage.signals.values
Cheers
B.
ES
ES 2017년 3월 22일
Yes. you can log the data and access it from workspace as explained in the link above. Once its able to be access, you can plot it in the same way.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by