matlab 复制 模块,想把m文件在simulink 中的调用,我用的是matlab function 模块。

RT   我的m文件的代码是function  h_vs= fcn(T_s)

B13=  [-575.520*10^-4  117.700*10^-5   491.369*10^-8      782.701*10^-2   -815.233*10^-3      256.383*10^-4     149.856*10^-1   -209.283*10^-2];

a=zeros(1,8);

for i=1:8

a(i)=B13(i);

end

coder.extrinsic('syms');

syms  h_vs u v;

T_s=T_s+273.15-61;

v=T_s-203.15;

u=(h_vs-350)^0.5-2.24076;

x=solve(u^3+a(1)*u^2*v+a(2)*u*v^2+a(3)*v^3+a(4)*u^2+a(5)*u*v+a(6)*v^2+a(7)*u+a(8)*v,h_vs);

y=max (real (double (subs(x))));

h_vs=y;

end

复制到matlab function中想要调用却出现如下8个错误:

Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.

Component: MAT

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值