Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I am getting an error "Data 'hhatdot' is inferred as a variable size matrix, while its specified type is something else." My equation is "hhatdot =p*(u(t-hh​at)-u(t-h)​)*udot". So please can anyone help me with this.

2 ビュー (過去 30 日間)
Chiliveri Vinod
Chiliveri Vinod 2018 年 12 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
function [hhatdot,bufferutnew] = fcn(ut,h,hhat,hmax,taus,udot,bufferut)
%#codegen
p = 0.05;
n=hmax/taus+1;
%%% updating input buffer
bufferutnew=zeros(1,2001);
bufferutnew(1,1:n-1)=bufferut(2:n);
bufferutnew(1,n)=ut;
indicehhat=floor(hhat/taus+1);
indicehhat=n-indicehhat;
indiceh=floor(h/taus+1);
indiceh=n-indiceh;
hhatdot = p*(bufferutnew(indicehhat:n)-bufferutnew(indiceh:n))*udot;
hmax=2, taus=0.001, udot=d/dt(u(t-hhat)), h =0.5+0.25sin(2t) , ut is a control signal
  2 件のコメント
madhan ravi
madhan ravi 2018 年 12 月 10 日
編集済み: madhan ravi 2018 年 12 月 10 日
upload the datas

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by