Printing output of evalfis to a static or edit textbox in GUIDE GUI
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Walter Roberson
2020-8-2
handles.AppropriateHandle.String = num2str(Y);
This will give you problems if Y has multiple rows, unless handles.AppropriateHandle.Max > 1
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Boundary Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!