Wind Tunnel Data Cell Array Question
显示 更早的评论
Hi All,
I am trying ot do something which I think should be pretty easy but I am having a hard time doing it and hope someone can help me out!
I have an Excel sheet with numerous cells of data. I am only interested in certain lines and have figured out how to inport the data into matlab and use it as I please currently creating varriables my self i.e "Probe_1, Probe_2" and performing certain operations to the Probe_x varriables. However, I am trying to automate the creation of the Probe_x varraible for my project to put into a GUI.
I am trying to create a solution that can manage the number of probes, i.e if I change the values of w and h then more Probe Varriables will be created. My end goal is to create a w by h matrix with probe data only when Wt_Speed is above 56.5.
For example if w = 4 and h = 8 then i would have 32 total probes and would want to organize only the values from each Probe when Wt_Speed > 56.5 in a 4x8 matrix.
data = xlsread(Selected_File); %Reads CSV
w = 3; % horizonatl probes app.ofHorizontalProbesEditField.Value;
h = 1; % vertical probes app.ofVeritcalProbesEditField.Value;
number_probes= w*h; %
for a = 1:number_probes;
Probes{a}=data(4:end,(35+a)); %creates a cell of probe data
end
%current way
Probe_1= cell2mat(Probes(:,1)); %Total Pressure Probe 1, Psf
Probe_2= cell2mat(Probes(:,2)); %Total Pressure Probe 2, Psf
Probe_3= cell2mat(Probes(:,3)); %Total Pressure Probe 3, Psf
%% Steady State Data Read
% Read only S.S data
Wt_Speed = data(4:end,25); %Wind Tunnel Speed Readout, Mph
SS_time = find(Wt_Speed>56.5); %finds all instances of mph>56.5
Hopefully this makes sense and thank you for your help in advanced!
Best,
Jake
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!