Borrar filtros
Borrar filtros

How do i write and save my calculation results in text file through GUI.

3 visualizaciones (últimos 30 días)
I am developing GUI which has push button through which i import one text file and use the data from text file to do some calculation, i want to store the result and write the file in the text format, here is the code ...
if true
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[fileList, folder] = uigetfile('*.9',...
'Find the File to Import', ...
'Multiselect', 'on')
fileList = cellstr(fileList)
kk = 1:length(fileList)
baseFileName = fileList{kk}
fullFileName = fullfile(folder, baseFileName)
fprintf(1, 'Now reading %s\n', fullFileName)
format short g
a = importfile_numtrix(fullFileName,11)
b = a(1,:)
c = b(:,2)
c1 = c*1.096
MF = c1*(b(:,8)*0.1)/(sqrt(b(:,10)+273.15))
spd = (b(:,3)*(sqrt(b(:,10)+273.15))*60)
SE = (MF)*(sqrt(287.03/287.18))*(sqrt(1.3360/1.3970))
WHP = SE*SPD
%dd = fprintf(1,'Now reading %f\n',WPH)
text_file = [MF,spd,SE,WPH]
e = fprintf('%f %f %f',text_file)
end
this is the code but i am unable to create and store the data in new text file, help would be greatly appreciate. thanks in advance

Respuestas (1)

bidyut mandi
bidyut mandi el 12 de Abr. de 2018
after running the code save the data from 'save the workspace'and then import the data.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by