MATLAB Answers

0

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."

Asked by Samadhi Hirimuthugoda on 16 Sep 2018
Latest activity Answered by Image Analyst
on 16 Sep 2018
%% 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}}

  0 Comments

Sign in to comment.

1 Answer

Answer by 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

  0 Comments

Sign in to comment.