Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
Afficher commentaires plus anciens
pleas help me where is the problem
>> F = imread("E:\PELAJAR\Unnes\PC\citra-grayscale2.jpg");
[tinggi, lebar] = size(F);
sudut = 5; % Sudut pemutaran
rad = pi * sudut/180;
cosa = cos(rad);
sina = sin(rad);
F2 = double(F);
m = floor(tinggi / 2);
n = floor(lebar / 2);
for y=1 : tinggi
for x=1 : lebar
x2 = (x-n) * cosa + (y-m) * sina + n;
y2 = (y-m) * cosa - (x-n) * sina + m;
if (x2>=1) && (x2<=lebar) && ...
(y2>=1) && (y2<=tinggi)
% Lakukan interpolasi bilinear
p = floor(y2);
q = floor(x2);
a = y2-p;
b = x2-q;
if (x2==lebar) || (y2 == tinggi)
G(y, x) = F(y2, x2);
else
intensitas = (1-a)*((1-bF(p,q) + ...
b * F(p, q+1)) + ...
a *((1-b)* F(p+1, q) + ...
b * F(p+1, q+1));
G(y, x) = intensitas;
end
else
G(y, x) = 0;
end
end
end
G = uint8(G);
figure(1); imshow(G);
clear all;
b * F(p+1, q+1));
↑
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check
for mismatched delimiters.
1 commentaire
Stephen23
le 21 Mar 2022
MATLAB has already underlined the syntax error for you:

Always pay attention to the syntax checking, it helps you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Eigenvalue Problems dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!