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.

7 ビュー (過去 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 Center および File ExchangeAuthor Block Masks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by