How to Write cell array to Excel

4 Ansichten (letzte 30 Tage)
Joshua Foote
Joshua Foote am 4 Sep. 2020
Kommentiert: Joshua Foote am 4 Sep. 2020
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)

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by