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-hhat)-u(t-h))*udot". So please can anyone help me with this.
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!