Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to generate from Simulink a set of pulses

1 Ansicht (letzte 30 Tage)
Blanca Rios A
Blanca Rios A am 30 Okt. 2013
Geschlossen: Sabin am 6 Jan. 2023
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.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by