matlab - Subscripted assignment dimensions mismatch error 4 -
I want to add to full size specific blocks (sub image) (or some other function 'fun') I have been using my own I get this error: Here my code is on the dim test matrix of 5,54. I block size is 2x2 (I :: 4); End function [J] = myblockproc (I, R, C) [M, N, P] = Size (I); Ro = plastering (m / r); CL = Plastering (N / C); Rr = Modern (M, r); Rc = Modern (n, c); Blk = zero (r, c, p); For I = 1: ro a = r; If I == ro A = RR; End tc = ((i-1) * r) +1; For J = 1: CL B = C; If Jammu == CL B = RC; End tr = ((j-1) * c) +1; K = 1: p tmp = I (:,,, k) blk (:,:, k) = tmp (tc: tc + a-1, tr: tr + b-1); End j = funny (blk); End end function [CR] = testmyblock () I (:,:, 1) = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 1920; 21 23 23 24 25]; I (:,:, 2) = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 1920; 21 23 23 24 25]; I (:,:, 3) = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 1920; 21 23 23 24 25]; I (:,:, 4) = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 1920; 21 23 23 24 25]; Cr = myblockproc (I, 3,3); Finally I'm not sure these functions are in the same file, but I Hopefully no, because you might get another error. Remeber though that the standard method in matlab is that all sub-functions should be called calling them calling functions. However, the reason is that you get this error that The best way to resolve this problem is to set a break point, either to the point where the error occurs, or to prevent errors ( myblockproc function (code below). Here I used a small matrix of dim 5,5,4 for the purpose of testing, in fact I have four big sizes The function on the images (not extra) is to be, in my dimensions of my real image Yes, N is 4.
Subtitle assignment dimension mismatch Myblockproc error (line 30) blk (: ,, ,, k) = tmp (tc: tc + A-1, tr: tr + b-1); Error in Testimo Block (line 19) CR = myblockproc (I, 3,3); size (blk (:,:, k) for some = k ) ~ = Size (tmp (tc: tc + a-1, tr: tr + b-1)) It's hard for me to solve the problem, because I do not know what you're doing and thus they can not say How to modify the length of vectors For example I do not know whether it is blk or TC , tr , ... this is incorrect. dbstop error < / Code> typing or setting a brake point from the menu). Here you can check the size of blk and tc , tr , ...
Comments
Post a Comment