Printing output of evalfis to a static or edit textbox in GUIDE GUI

2 visualizaciones (últimos 30 días)
I am trying to print the result of evalfis (fuzzy logic toolbox) to a textbox in a GUIDE gui.
For example, pushbutton10_callback when pressed prompts the user for inputs and then uses the inputs for the evalfis, then prints the results in a bar graph using bar.
I want to print Personal, Financial and Mailing to the text box.
% Print the evaluation outputs
% Obtain results of the personal output
Personal = evalfis(handles.a1, [personal1; personal2; personal3]);
% Obtain results of the financial evaluation.
Financial = evalfis(handles.a2, [financial1; financial2]);
% Obtain results of the mailing evaluation.
Mailing = evalfis(handles.a3, [Financial; Personal; social]);
X = categorical({'Personal', 'Financial', 'Mailing'});
X = reordercats(X, {'Personal', 'Financial', 'Mailing'});
Y = [Personal, Financial, Mailing];
b = bar(X, Y);
How do I do this?
  5 comentarios
Image Analyst
Image Analyst el 2 de Ag. de 2020
So, are you saying that you would rather not answer our questions?
Caleb Berriman
Caleb Berriman el 2 de Ag. de 2020
I did answer most of them..
Q-What difficulty are you experiencing? What format of output are you looking for in the text box?
A- I was hoping to just have the numeric solutions to the evalfis functions displayed in the text box. Whereas nothing appears in the textbox at the moment.
Q- How are you assigning handles.a1?
A- I assigned handles.a1 = readfis(fis);
Q- They're structure members that you added, right?
A- I'm not exactly sure what this means, it's my first time using GUIDE to create a gui

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 2 de Ag. de 2020
handles.AppropriateHandle.String = num2str(Y);
This will give you problems if Y has multiple rows, unless handles.AppropriateHandle.Max > 1

Community Treasure Hunt

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

Start Hunting!

Translated by