Matlab-Simulink通信系统建模仿真

Matlab-Simulink通信系统建模仿真bug,不知道为什么加的信源好像不起作用,

img

img

结果应该像上图一样显示,但是示波器里没有输出,连接是按照图里一样连的

img

组件:Simulink | 类别:Block 警告
编译期间模块 'test_703/BSC信道' 中发生错误。

原因: Failed to create folder D:\Program Files\MATLAB\R2022a\bin\slprj_cgxe\tu_28 due to the error: fl:filesystem:AccessDenied
组件:Simulink | 类别:Block 错误

信源模块选错了,不是用BSC,更换成下面这个再按你的测试代码可以计算出误码率:

clc,clear,close all;
x = 0:0.051:0.1;
y = x; %预定义y
for i=1:length(x)
        ERR=x(i);
        simout = sim("simulink-test");
        y(i)=mean(simout.ERROUT); %mean取平均值
end
plot(x,y,'linewidth',2);
hold
scatter(x,y,'linewidth',2);grid
legend("误码率","ERR","location","NorthWestOutside" )
xlabel("信道传输错误概率")
ylabel("输出误码率")

img