Info
This question is closed. Reopen it to edit or answer.
Stuck, How do I use an input and try to check it against my excel data?
1 view (last 30 days)
Show older comments
Hello,
I have written a code that takes information from an excel file that has four columns. The first column represents a Height while the next three columns contain the velocity pressure exposure coefficients. I have been able to ask a user to input the Height and the Exposure type. I have no idea how to take that input and if it is not an exact height that matches one of the values in the first column, to interpolate the coefficient value based on the input's upper and lower bounds.
Here is the code I have written so far:
data = xlsread('HW23.xlsx');
num_rows=size(data,1);
num_columns=size(data,2);
hvar=input('Input the height above ground: ');
A=-1;
B=0;
C=1;
exposure=input('Input the exposure type (A, B, or C): ');
if exposure < 0;
y = data(:,2);
elseif exposure == 0;
y = data(:,3);
elseif exposure > 0;
y = data(:,4);
end
I have also attached the Excel spreadsheet with all the values.
I do not want an answer, only some hints and guidance.
Thank you!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!