![]() |
求助:运行时出现错误提示Matrix dimensions must agree
函数如下:U是URL的集合,函数的功能是根据链接关系建立一个关系矩阵。
function G = matrix(U,n) G = logical(sparse(n,n)); m = 1; i = 1; for j = 1:n page = urlread(U{i}); for f = findstr('http:',page) % A link starts with 'http:' and ends with the next quote. e = min([findstr('"',page(f:end)) findstr('''',page(f:end))]); if isempty(e), continue, end url = deblank(page(f:f+e-2 if ( U{i} == url ) G(i,j) = 1; line(j,i,'marker','.','markersize',6) continue end j = j+1; end end 运行时报错 Error using ==> eq Matrix dimensions must agree. Error in ==> matrix at 13 if ( U{i} == url ) 我刚开始学Matlab,希望大家帮我看看,谢谢! |
所有时间均为北京时间。现在的时间是 12:59。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.