How to solve the error: 'Input data must have as many columns as input variables and as many rows as independent sets of input values.'
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello! I created HTML-built UI and embedded it to matlab. I am able to pass the user-inputed data from the UI to matlab. My problem now is whenever I insert those data to my anfis model, it was generating this error

my riskFis is expected to receive 19 inputs and 5 inputs for typeFis, I already counted my inputs and they're of correct number. I tried changing my riskinputs to 19 constant number and the error is gone. But when i tried putting one input from the user-inputted data (the rest constant number), the error is back again. This is the code
% Data changed function: Assessment
function AssessmentDataChanged(app, event)
data = event.Data;
rfis = readfis('riskFis');
tfis = readfis('typeFis');
riskInput = [data.Age 38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
riskOutput = evalfis(rfis, double(riskInput));
typeInput = [data.Age data.Temp data.Cough data.Hospital data.Ventilator];
typeOutput = evalfis(tfis, double(typeInput));
disp(riskOutput)
disp(typeOutput)
end
There is also no problem when i input user inputted data from the ui built with web app designer. So i think the problem is the data coming from the html built UI, but i dont know how to solve it.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!