Writing Data to Excel file
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
V_rng = [0:0.001:27.7778];
%**********************************************
%Vehicle Aerodynamic drag calculation and plot
%**********************************************
Cd = 0.0145; % Aerodynamic Drag Coefficient
row = 1.1; % Density of air
A = 0.5; %projected Vehicle area
F_drag = double.empty;
index = 1;
for i = V_rng
F = 0.5* row * Cd * A * (i^2);
F_drag(index) = F;
index = index + 1;
end
subplot (2,2,1)
title('Aerodynamic Drag Vs Vehicle Velocity')
plot(V_rng,F_drag)
xlabel('Vehicle Velocity[m/s]')
ylabel('Vehicle Aerodynamic Drag Force [N]')
%writing values to excel file
xlswrite('forceValues', F_drag)
xlswrite('VelocityValues', V_rng)
The error im getting: Error using xlswrite (line 224)
The specified data range is invalid or too large to write to the specified file format. Try writing to an XLSX file and use Excel
A1 notation for the range argument, for example, ‘A1:D4’.
Error in Resistive_Forces_calculations (line 27)
xlswrite('forceValues', F_drag)
0 commentaires
Réponses (1)
Shawn Duenas
le 6 Fév 2019
Modifié(e) : Shawn Duenas
le 6 Fév 2019
To print to different worksheets in the same spreadsheett:
xlswrite(myFile, F_drag, 'forceValues')
xlswrite(myFile, V_rng, 'VelocityValues')
to print to new spreadsheets, add '.xls' to end of file name.
xlswrite('forceValues.xlsx', F_drag)
xlswrite('VelocityValues.xlsx', V_rng)
0 commentaires
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!