フィルターのクリア

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

3 ビュー (過去 30 日間)
sandip bhagat
sandip bhagat 2018 年 4 月 12 日
回答済み: bidyut mandi 2018 年 4 月 12 日
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

回答 (1 件)

bidyut mandi
bidyut mandi 2018 年 4 月 12 日
after running the code save the data from 'save the workspace'and then import the data.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by