Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I use the function?

2 ビュー (過去 30 日間)
Sun Kyoo Choi
Sun Kyoo Choi 2020 年 4 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi all,
I was trying to understand this code:
Assuing there are a lot of files named 'Plane'.
So, what does this actually tell? and in order to work, how am I supposed to do? Is it a function that I have to recall from another script?
Files=dir('Plane*.xls');
x1=[1,2,3,4,5,6,7,8,9,10,11,12,13,14];
x2=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16];
for i=1:15
[Re_Plane(i),delRe_Plane(i),alp_Plane(i),Cl_Plane(i),Cd_Plane(i),Cdth_Plane(i),delCl_Plane(i),delCd_Plane(i)]=Airplane(x1(i),x2(i),Files(i).name);
end
Re_Plane=mean(Re_Plane);
delRe_Plane=std(Re_Plane)*3.821;
delCdth_Plane=ones(1,15)*(Cdth_Plane(11)-Cdth_Plane(10))/2;
  1 件のコメント
darova
darova 2020 年 4 月 11 日
Do you have more information?

回答 (2 件)

Cris LaPierre
Cris LaPierre 2020 年 4 月 11 日
This code has an indexing error, and as such, won't run.
Where'd you get this code from? Is it supposed to be working?

Image Analyst
Image Analyst 2020 年 4 月 11 日
It returns 8 values from the Airplane() function for every file you pass in to it, up to a max of 15 files. And you'd better have exactly 15 files or else you'll get an error. If you want all files regardless of how few or many there are, do this:
for i = 1 : length(Files)
  4 件のコメント
Sun Kyoo Choi
Sun Kyoo Choi 2020 年 4 月 12 日
Sun Kyoo Choi
Sun Kyoo Choi 2020 年 4 月 12 日
here as well.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by