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