Error: File: fingerprint.m Line: 72 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

조회 수: 2 (최근 30일)
%to get y gradient
filter_gradient = transpose(filter_gradient);
I_vertical = filter2(filter_gradient,image);
gradient_times_value=I_horizontal.*I_vertical;
gradient_sq_minus_value=(I_vertical-
I_horizontal).*(I_vertical+I_horizontal);
gradient_for_bg_under = (I_horizontal.*I_horizontal) +
(I_vertical.*I_vertical);
for i=1:W:w
for j=1:W:h
if j+W-1 < h & i+W-1 < w
times_value = sum(sum(gradient_times_value(i:i+W-1, j:j+W-1)));
minus_value = sum(sum(gradient_sq_minus_value(i:i+W-1, j:j+W-
1)));
sum_value = sum(sum(gradient_for_bg_under(i:i+W-1, j:j+W-1)));
bg_certainty = 0;
theta = 0;
if sum_value ~= 0 & times_value ~=0
%if sum_value ~= 0 & minus_value ~= 0 & times_value ~= 0
bg_certainty = (times_value*times_value +
minus_value*minus_value)/(W*W*sum_value);
if bg_certainty > 0.05
blockIndex(ceil(i/W),ceil(j/W)) = 1;
  댓글 수: 4
indrani dalui
indrani dalui 2020년 4월 21일
gradient_sq_minus_value==(I_vertical-
I_horizontal).*(I_vertical+I_horizontal);
(gradient_for_bg_under) = (I_horizontal.*I_horizontal) +
(I_vertical.*I_vertical);
in above underline portion that errpr is shown

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2020년 4월 21일
If you want to break a calculation across multiple lines, you must use ... at the end of the line to continue the expression to the next.
a = 1 + ...
2 + 3 % result is a = 6
b = 1 + ...
2 + ...
3 + ...
4 % result is b = 10
If you omit the ellipsis:
c = 1 +
2 + 3; % result is an error

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by