How to Write cell array to Excel
3 次查看(过去 30 天)
显示 更早的评论
Hi, I have finally been able to get results using the following script however each of the results come out as a (1 x 1 cell). I know that i can use celldisp to reveal each cells result but how do i write them to excel. The script is as follows.
numData = xlsread('Method 2 Worksheet');
%Pressure From Excel
P = numData(:,13);
Ruskin = numData(:,14);
Burst = numData(:,1);
%Variables from excel calcs
W = 0.392699;
K = 13.8125;
q = 10.13;
d = 9.5;
g = 9.81;
x = 1025;
%Use H=F(Min:Max) for values
Sx=cell(numel(P),1);
for ii = 1:length(P)
syms z
eqn = (P(ii).*10.^4./x)-(q.*10.^4./x)==((W.^2.*cosh(K.*(d+z)))/(sinh(K.*d)))-g.*z;
Sx{ii} = solve(eqn,z);
end
celldisp(Sx)
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!