【问题标题】:adjusting amplitude modulation / wave shaping调整幅度调制/波形整形
【发布时间】:2011-11-30 15:54:49
【问题描述】:

我有一些工作代码可以进行幅度调制并绘制它。 但是我正在尝试改变调制的方式 (y 变量) 所以它看起来像一个鸡蛋形状。我找到了一个看起来不错的方程式/网站 http://www16.ocn.ne.jp/~akiko-y/Egg/index_egg_E.html 但我不确定如何将其转换为 matlab/octave 代码以更改 y 变量

%test_amplitude modultaion
fs=1000;
t=linspace(0,2*pi,fs);

mt=1*sin(100*t); %signal you want to use
y=mt.*(1+cos(1*t+pi));%modulation equation, use pi to shift over 90 deg to start at 0

y=y';
y_norm=(y(:,1)/max(abs(y(:,1)))*.8); %normalize signal

plot(y_norm)

PS:这是matlab/octave代码

【问题讨论】:

    标签: math matlab octave differential-equations


    【解决方案1】:

    使用您链接的页面上给出的方程式:

    a = 2*pi;
    b = a; % change this depending on the shape of the egg you want
    
    mt=1*sin(100*t); %signal you want to use
    y = mt.*sqrt((a-b)-2*t + sqrt(4*b*t + (a-b)^2)).*sqrt(t)/sqrt(2); % modulation
    

    你的代码的其余部分是 A-OK,虽然我可能会在最后使用 plot(t,y_norm)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 1970-01-01
      • 2018-03-20
      相关资源
      最近更新 更多