Error when building a trend line
Mostrar comentarios más antiguos
[cat,nocat]=min(Animals); % cat and dog 1x1200
[dog,nodog=max(Animals); % cat and dog 1x1200
for i=1:length(cat)
pas(i) = polyfit(cat(i),dog(i),1); % error Subscripted assignment dimension mismatch.
fss(i) = polyval(dog(i),cat(i));
end
I'm trying to build a trend line of two values of cats and dogs, but I get an error, help me figure out what's wrong.
Probyval without a loop, gives only the latest values.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!