フィルターのクリア

How to turn this into a single matrix?

1 回表示 (過去 30 日間)
bio lim
bio lim 2015 年 5 月 28 日
回答済み: Murali Krishna 2015 年 5 月 28 日
Hello. I am trying to find flight times for 1km, 2km, 5km, 10km using different datas. I have a structure array (1x46) data, and I have used the following code.
dis = [1 2 5 10] ; % 1km, 2km, 5km, 10km
for n = 1 : length(data) % 1 : 46
if ~isempty(data.IAS) % There are some empty arrays, IAS is the indicated airspeed field.
data(n).temp_time = dis * 1943.844492 / mean(data(n).IAS); %the constant is for unit conversion
end
end
The problem I am having is that when i type data.temp_file in the command window, I am having answer like this.
ans = 1.32 3.42 5.61 8.123
ans = 1.56 3.23 5.76 8.00
ans = ... ... ... ...
.
.
When i type data.temp_file, I wanted to show me one single matrix, so that I will have easier time finding the variance for each columns. Anyone can give any advice? Thanks!

採用された回答

Murali Krishna
Murali Krishna 2015 年 5 月 28 日
with the statements given in the problem I get the information that temp_time is a field of structure "data".. then include the following statement in the same loop and try..
temp_time{n}=getfield(data,{1,n},'temp_time');
check for temp_time

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by