我试过这个:
linefunca = @(xa,ya) aa*xa + ba*ya + ca;
figure(1)
imshow(Pica);
hold on;
ezplot(linefunca,[1,1072,1,712]);
但是我返回了这个错误:
In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in ezplotfeval/applyfun (line 80)
z(i) = feval(f,x(i),y(i));
Error in ezplotfeval (line 65)
z = applyfun(x,y);
Error in ezplot>ezimplicit (line 257)
u = ezplotfeval(f, X, Y);
Error in ezplot (line 153)
hp = ezimplicit(cax, f{1}, vars, labels, args{:});
Error in ps3 (line 313)
ezplot(linefunca,[1,1072,1,712]);
aa
, ba
,ca
都是已知值(列向量)。x 和 y 限制是我正在使用的图像的大小。我正在尝试绘制一组极线。有什么建议么?
编辑:
lt = length(aa);
linefunca = @(x,y,t) aa.*x(t) + ba.*y(t) + ca(t);
figure(1)
imshow(Pica);
hold on;
for t=1:lt
ezplot(@(x,y,t) linefunca(x,y,t),[1,lt]);
end