Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

??? Undefined function or method 'irisBasisSVD' for input arguments of type 'double'.

2 Ansichten (letzte 30 Tage)
ibrahim
ibrahim am 24 Mär. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
can someone please help me resolve this issue? I initially converted my image into svd pattern and used the save function to save it in the '-mat' format. for training, the program used the load function to call the save format, and the program was supposed to get 3 dimensions. The program got stocked at this stage displaying an error message of undefined function or method. here is the part of the code with the error:
load irisBasisSVD;
%get only first 3 dimensions'
nclasses=50;
TS=[irisBasisSVD(1:nclasses*7,1:3) irisBasisSVD(1:nclasses*7,41)]; % this is the part with the error.

Antworten (2)

Wayne King
Wayne King am 24 Mär. 2013
Are you sure that when you load the irisBasisSVD.mat file, that the variable(s) inside the .mat file is actually called irisBasisSVD?
If you enter
whos('-file','irisBasisSVD.mat')
what is returned?
  1 Kommentar
ibrahim
ibrahim am 24 Mär. 2013
hi Wayne thanks for your reply, i am sorry for responding late. here is the answer to what you asked:
>> whos('-file','irisBasisSVD.mat') Name Size Bytes Class Attributes
T 1x640 5120 double

Wayne King
Wayne King am 24 Mär. 2013
Your answer to my question means that the only variable in that .mat file is a single row vector, T.
Accordingly, you cannot address irisBasisSVD( ) in the MATLAB workspace like it is a matrix, because MATLAB will think you are trying to call a function irisBasisSVD().
You should substitute the actual variable name, which is T. However, you have another issue, T is a row vector, NOT a matrix as you seem to think by your addressing of both row and column elements of irisBasisSVD
  4 Kommentare
ibrahim
ibrahim am 24 Mär. 2013
i am sorry, i was offline, can u give me your email so that i can send you the code i used for the conversion? i will be so so glad if you can go through it for me. this is my project and i have to submit this Saturday.thanks
ibrahim
ibrahim am 24 Mär. 2013
hello wayne, here is the code i used to convert the image into svd:
clc; clear;
%set base directory of irisBasis directory irisDir = 'C:\Users\livingstone\Desktop\iris';
clc; T=[];
irisFiles = dir(irisDir);
for i=1:size(irisFiles,1)
if not(strcmp(irisFiles(i).name,'.')|strcmp(irisFiles(i).name,'..'))
irisFileName = [irisDir, '\', irisFiles(i).name];
F=imread(irisFileName); A=im2double(F);
%perform singular value decomposition
s=mp_mysvd(A);
P=[s', str2num(irisFiles(i).name(1:3))]; T=[T,P]; irisFileName [size(P) size(T)] end end
save ('irisBasisSVD', 'T', '-ascii')

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by