宿題を書いていて、Octave を使用してこのエラーに遭遇しました。私のソリューションの機能には影響しませんが、なぜこの警告が表示されるのか知りたいです。
% X is column vector, p is max degree of polynom
% example:
% X = [1;2;3;4], p = 3
% X_poly = [1,1,1; 2,4,8; 3,9,27; 4,16,64]
function [X_poly] = polyFeatures(X, p)
powers = ones(numel(X),1) * linspace(1,p,p);
X_poly = X .^ powers;
end
よろしく、
トム