This is my first math lab program. When I move to the testing step I got an error. "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters."

1 view (last 30 days)
%% Test Image clc; clear all; close all; [fname path]=uigetfile('.jpg','Provide a Image for Testing'); fname=strcat(path,fname); im=imread(fname); imshow(im); title('Test Image'); %% Find out which class it belongs Ftest=FeatureStatistical(im); %% Compare with database load db.mat Ftrain=db(:,1,2); Ctrain=db(:,3); for{1=1:size{Ftrain,1}} dist{1,:}=aum(aba{Ftrain{1,:}-Ftest}); end m=find(dist==min(dist),1); det_class=Ctrain(m); msgbox(strcat('detected class=',num2str(det_class)));
I got the error message for , for{1=1:size{Ftrain,1}}

Answers (1)

Image Analyst
Image Analyst on 16 Sep 2018
Didn't I just answer this? I said your braces and parentheses are messed up. See the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F

Community Treasure Hunt

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

Start Hunting!