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)

回答(1 个)

KSSV
KSSV 2020-9-4
Read about xlswrite and writetable.
  1 个评论
Joshua Foote
Joshua Foote 2020-9-4
I have read that and tried those commands and they did not work. Could you be more specific on what to type exactly

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by