Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to generate from Simulink a set of pulses

조회 수: 1 (최근 30일)
Blanca Rios A
Blanca Rios A 2013년 10월 30일
마감: Sabin 2023년 1월 6일
Which can control them all: amplitude, frequency, period, wave length. (The pulse generator or the pulse train provides infinite loops and I want to check if I need 2, 5, 20, etc.. Pulses)I tried Function Matlab (R2011a) function[y]=impulss() % code coder.extrinsic('pulstran','rectpuls','linspace'); T=0.05;%Período 0.5 D=0.015;%Duración pulsos 0.015 assert(N<1000) N=10;%No. de pulsos 2 x=linspace(0,T*N,1000); d=0:T:T*N; %disparo y=pulstran(x-D/2,d,'rectpuls',D); end Error displayed: MATLAB Function Interface Error: Size mismatch for 'linspace' on dimension 2: actual size 2 is greater than the specified maximum size 1. Block MATLAB Function (#106) While executing: none If connected to a transfer function indicates that the dimensions are different! Thanks ... really.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by