필터 지우기
필터 지우기

how to plot in simulink

조회 수: 4 (최근 30일)
Prajwal N
Prajwal N 2024년 3월 28일
편집: Pramil 2024년 4월 1일
i designed a simulink model where i was in need to plot the result vectro obtained , so how can i do that as i didnt get any method to do that
i want to plot my ouput vs input which are both vectors
  댓글 수: 1
Manikanta Aditya
Manikanta Aditya 2024년 3월 28일
You can plot the output versus input vectors in Simulink using the To Workspace block for saving the vectors and then using MATLAB’s plot function.
You can Save the vectors in Simulink, run the model and plot the vectors in MATLAB
plot(input, output)
xlabel('Input')
ylabel('Output')
title('Output vs Input')

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

채택된 답변

Pramil
Pramil 2024년 3월 28일
Hello Prajwal N,
What Manikanta Aditya suggests works but if you do not want to save your output and just want to plot,
you can use the "scope" block for plotting the input and output of your Simulink model.
Here is the documentation for the same:
This would resolve your issue.
  댓글 수: 3
Prajwal N
Prajwal N 2024년 3월 28일
@Pramil, but the scope gives only plots of time domain right means x axis has time..or can we change x axis to our input vector. Or using To workspace is the only method
Pramil
Pramil 2024년 4월 1일
편집: Pramil 2024년 4월 1일
Prajwal N the "Scope" will plot your data against time, in cases where you want to plot your "Input" on x-axis and "Output" on y-axis, use the "XY-Graph" block.
You can refer this link for more information about the block:

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

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by