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.
1 次查看(过去 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 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Pulsed Waveforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!