フィルターのクリア

exporting data to seperate excel sheets

2 ビュー (過去 30 日間)
LINDO MTSWENI
LINDO MTSWENI 2019 年 5 月 2 日
can someone please help me with the following question regarding the attached code. the question is : write each of the output variables of the StressCalc Function to seperate sheets in the Excel file Results.xlsx. The sheets must have the same names as the variables that are written to them.
below is the code i created to calculate the required variables.
function [CriticalPoints, ShearStresses, BendingStresses, AxialStresses, VonMisesStresses] = StressCalc(ForceData,Areas,Is, Heights)
############## INPUT SUB-FUNCTION CODE BELOW THIS LINE ###################
for f=1:1:length(Areas);
C(f)=Areas(f);
end
F=(3*ForceData.ShearForce(:,2))'./(2*C)';
ShearStresses=round(100*F)/100;
for d=1:1:length(Areas);
A(d)=Heights(d)./2;
end
B=(ForceData.BendingMoment(:,2)*A)'./Is;
BendingStresses=round(100*B)/100;
for k=1:1:length(Areas);
P(k)=Areas(k);
end
T=(ForceData.AxialForce(:,2))'./P';
AxialStresses=round(100*T)/100;
VonMisesStresses=sqrt((AxialStresses+BendingStresses).^2+3*(ShearStresses).^2);
CriticalPoints=max(VonMisesStresses,[],2);

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by