马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
AA= load ('sin_val.mat');
sin_val = AA.sin_val;
for i= 1:N
if ((0<=rom_addr(i))&&(rom_addr(i)<=511))%00
memaddr(i) = rom_addr(i);
elseif ((512<=rom_addr(i))&(rom_addr(i)<=1023))%01
memaddr(i) =fi(1023-rom_addr(i),T_memaddr,F_memaddr);
elseif ((1024<=rom_addr(i))&(rom_addr(i)<=1535))%10
memaddr(i) = fi(rom_addr(i)-1024,T_memaddr,F_memaddr);
elseif ((1536<=rom_addr(i))&(rom_addr(i)<=2047))%11
memaddr(i) = fi(2047-rom_addr(i),T_memaddr,F_memaddr);
else
memaddr(i) =fi(0,T_memaddr,F_memaddr);
end
m = sym( memaddr(i));
rom_data(i) =sin_val( m +1);%报错
end
??? Error using ==> sym.sym>notimplemented at 2514
Function 'subsindex' is not implemented for MuPAD symbolic objects.
Error in ==> sym.sym>sym.subsindex at 1344
notimplemented('subsindex');
Error in ==> fixed_point_simulink at 76
rom_data(i) =sin_val( m +1); |