Matlab to C code conversion issue
显示 更早的评论
function final_seq=myapp(x,y,a,b,i,j,z,k,p,m,new,xt,J,ix,X1,final_seq)
x=input(' Enter fast clock ratio '); %fast clock
y=input(' Enter slow clock ratio '); %slow clock
................
end
when i try to compile the above code in matlab coder,following error pops up:
" input is not supported for code generation"
What is the work around this issues.Please help its urgent
采纳的回答
更多回答(1 个)
Steven Lord
2019-8-14
function final_seq=myapp(x,y,a,b,i,j,z,k,p,m,new,xt,J,ix,X1,final_seq)
x=input(' Enter fast clock ratio '); %fast clock
y=input(' Enter slow clock ratio '); %slow clock
x and y are the first two inputs to your function, but your input calls are throwing away those first two inputs to replace them with the user-entered data. Why not just have the code that calls your generated function pass x and y into your function directly and eliminate input?
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!