I have plotted a signal in Simulink and now i want to write a code to integrate that signal over the limits? can anyone help me with this please

조회 수: 2 (최근 30일)
clc;
clear all;
open('tranmissionfault.slx');
sim('tranmissionfault.slx');
syms t
P=int(Phasecurrent,t,0,0.008)

채택된 답변

madhan ravi
madhan ravi 2024년 1월 6일
편집: madhan ravi 2024년 1월 6일
Use Integrated Limited block specifying the upper limit as 0.008 and lower as 0.
edit: Thanks @Paul, i overlooked it, yes the same goal can be achieved in Simulink using a switch block, but not going in detail into it, since the OP's intention is to use MATLAB code
  댓글 수: 17
A Lumbini
A Lumbini 2024년 1월 7일
Sir, i got 0.15 approximately when i integrate the sine wave
But,then i tried the same after the fault and i am getting huge value
F=0.05
ix = (Phasecurrent.Time >= F) & (Phasecurrent.Time <=F+0.020047);
Int = cumtrapz(Phasecurrent.Data(ix))
vpa(Int(end))
ans =
137031976.93982961773872375488281

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

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by