I'm quite new to matlab so this might be a very simple question but I can't seem to get my head around it, so would really appreciate any help!
I have this function, which is supposed to create a new variable 'retrievalList' which is a cell composed of the raw contents of an excel spreadsheet:
function [retrievalList] = dispList( pID );
switch pID;
case pID < 5;
  [num txt raw] = xlsread('list00.xlsx');
  retrievalList = (raw);
    case pID(pID >= 5 && pID < 9);
    [num txt raw] = xlsread('list01.xlsx');
    retrievalList = (raw);;
end
end
For some reason the output of this function is a general 'ans' instead of 'retrievalList', can anyone explain what I'm doing wrong?
Many thanks, Darya
