Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
comparing two matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
A = 000010000000100070007000000013543570107013507135071213571357121357135713221223671323672322222223322222222223222232222222212222222223222222322222222222223222222132223222223672222236710123567223667213657223667223667213223213223213213650721076507657650076600725443444654344446544444444444635723671350070107013544444
a = 010000001070000070000135434507107234607232367236723232223232322232323232223222322222323222223222222332222222223222222223222223222212232222132212221323211355721365721365721365710135572136547254365071001355071000107100000000704
i need a method to use to compare this two matrix... like in pattern mining... i do not need it to find exactly the same match.... but more like 70% match, taking the sequence into little consideration
댓글 수: 2
Andrew Newell
2011년 4월 27일
That is a far from trivial problem, and there doesn't seem to be any MATLAB code for it. I recommend you do a search on "pattern mining algorithms" and then implement an algorithm in MATLAB.
답변 (2개)
do
2011년 5월 6일
Is there any comparation operator applied for matrixs, like the dot operator '.*', './', '.^' Hi, I have function f like this function z=f(x,y) if(x<1 & y <1) z=0; else z=1; end end And a script x=0:0.1:2; y=0:0.1:2; [X,Y]=meshgrid(x,y); Z=f(X,Y); mesh(X,Y,Z); When running this script, I got this errors: Z must be a matrix, not a scalar or vector.
It's because x and y here are two arrays, not scalar value. The script can run if I change the function f looks like this: function z = f( x,y ) for i=1:size(x,2) for j=1:size(y,2) if(x(i)<1 & y(j)<1) z(i,j)=0; else z(i,j)=1; end end end end
The broblem is that the new function runs much slower than the first one. I don't know if there is any comparation operator applied for arrays in this case, like the ".*" operator used in this function function z=f(x,y) z=x.*y; end Thank you very much.
댓글 수: 1
Oleg Komarov
2011년 5월 6일
ask your question in a separate thread: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!