Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to generate from Simulink a set of pulses
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!