フィルターのクリア

save data after each loop in next row of xlsx file

1 回表示 (過去 30 日間)
Chris
Chris 2014 年 3 月 26 日
コメント済み: Azzi Abdelmalek 2014 年 3 月 26 日
Hey every body, i wrote following:
d = 3.6;
d_hinge = 3.6;
g = 9.80665;
for T = 1:2
% Relation between hinge point depth and water depth:
zeta = d_hinge./d
% Calculation of radian wave frequency omega:
omega = 2.*pi./T;
% Calculation of wave length L0(deep water):
L0 = g.*T.^2./(2.*pi);
% Naeherungsloesung nach Fenton & McKee 1990:
L = L_Fenton_McKee(L0,d);
%Calculation of Wavenumber k0:
k0 = 2*pi/L;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Start of calculations needed for H_star:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calculation of R0:
R0 = R0_aus_k0(k0,d,d_hinge);
% Calculation of H_star:
H_star = H_star(R0,d_hinge);
end
Now i want to save the data after each loop into a xlsx file( after each loop a in a new row). Does anybody knows a solution?

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 26 日
You can save your data in a Matrix M, then aftr the loop, save the matrix in your Excell file
xlswrite('file.xlsx',M)
  4 件のコメント
Chris
Chris 2014 年 3 月 26 日
i want to save both H_star and L
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 26 日
There are missing data in your code, we can't test it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by