prompt{1}='Enter Movie Rating :';prompt{2}='Enter Revenue :'; name='Prediction';ans{1}=inputdlg(prompt{1},name);ans{2}=inputdlg(prompt{2},name);x =(ans{1});y =(ans{2});a=xlsread('inputdata.xlsx');disp(a);output=a(ismember(a(:,1:2),[x y],'rows'),3);disp(output);
inputdata.xlsx contents
0.1 0.3 0.10.1 0.4 0.20.1 0.5 0.20.1 0.6 0.20.1 0.7 0.30.1 0.8 0.30.2 0.1 0.10.2 0.2 0.20.2 0.3 0.20.2 0.4 0.20.2 0.5 0.30.2 0.6 0.30.2 0.7 0.30.2 0.8 0.40.3 0.1 0.10.3 0.2 0.20.3 0.3 0.20.3 0.4 0.30.3 0.5 0.30.3 0.6 0.3
Error message is : Input must be cell arrays of strings.
Best Answer