What is wrong with my function?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
function LinearOperator
set S=data
for t=S(:,1)
if t=1 then ViOld=0
else set ViOld=S(t,2)
end
set Qi=S(t,3)
end
k=1:length(t)
set ViNew(t,k)=alpha*ViOld*(t-1)+(1-alpha)Qi(t)
set ViOld=ViNew
set t=t+1
end
end
1 Kommentar
Explorer
am 8 Mär. 2016
The way you have written code in question is not correct. Edit it, select the code only and select code option.

Antworten (1)
Walter Roberson
am 8 Mär. 2016
0 Stimmen
The first operand to set() must be a graphics handle or object handle, not a string such as 'S=data'
MATLAB does not use 'set' in assignments. Just remove the word 'set' from your code.
2 Kommentare
Walter Roberson
am 8 Mär. 2016
Also, tests use == not =
Isabel Rojas-Ferrer
am 13 Mär. 2016
Diese Frage ist geschlossen.
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!