필터 지우기
필터 지우기

How do i print a bar graph using simulink?

조회 수: 1 (최근 30일)
Kyon
Kyon 2016년 3월 1일
답변: Kothuri 2024년 3월 28일
i want to print a bar graph using matlab function or .mat file taking an array of numbers in a simulink model

답변 (1개)

Kothuri
Kothuri 2024년 3월 28일
Hi Kyon,
There are 2 methods to print a bar graph in MATLAB from an array of numbers within a Simulink model:
  • Using a MATLAB function block – Insert a MATLAB function block into the Simulink model and define the function which takes the array as input and use ‘bar’ function to create the bar graph.
  • Using To Workspace and MATLAB script – Insert a ‘To Workspace’ block into the Simulink model and configure the block parameters such as:
‘Variable name’ – choose the name of the workspace variable
‘Save format’ – select Array
And then run the Simulation and plot the data using ‘bar’ function after the simulation in MATLAB Command Window or Script.
Below link directs to the documentation of ‘bar graph’.
Hope this clarifies your question on how to visualize an array of numbers as a bar graph.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by