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 vues (au cours des 30 derniers jours)
%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 commentaires
indrani dalui
indrani dalui le 21 Avr 2020
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

Connectez-vous pour commenter.

Réponses (1)

Steven Lord
Steven Lord le 21 Avr 2020
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

Catégories

En savoir plus sur Author Block Masks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by