Azzera filtri
Azzera filtri

How to solve "Input data must have as many columns as input variables and as many rows as independent sets of input values." error

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (0)

Categorie

Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by