How Do I calculate the Dew Point from the Temperature and Relative Humidity. The equation I need to use is: Td = T - ((100 - RH)/5.)
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
%% Import data from text file
% Script for importing data from the following text file:
%
% filename: C:\Users\smctu\OneDrive\Documents\School\Remote Sensing\sonde_data.txt
%
% Auto-generated by MATLAB on 18-Mar-2021 01:23:08
%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 7);
% Specify range and delimiter
opts.DataLines = [4, Inf];
opts.Delimiter = " ";
% Specify column names and types
opts.VariableNames = ["FltTime", "Press", "Temp", "RelHum", "WSpeed", "WDirn", "GPM_AGL"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
opts.ConsecutiveDelimitersRule = "join";
opts.LeadingDelimitersRule = "ignore";
% Import the data
sondedata = readtable("C:\Users\smctu\OneDrive\Documents\School\Remote Sensing\sonde_data.txt", opts);
figure
subplot(2,1,1)
X=sondedata.Temp+273.15
Y=sondedata.GPM_AGL
Z=sondedata.RelHum
plot(X,Y,'r')
hold on;
plot(X,Z,'b-')
xlabel("Temperature(K)")
ylabel("Altitude(km)")
ylim([0,25000])
yticks(0:5000:30000)
clear opts
4 Kommentare
John
am 3 Mai 2025
ok got it..... I just need to point this to my data file.
will this calculator work for temperatures down in the -100 C
thanks,
Walter Roberson
am 5 Mai 2025
The code does not do any meaningful caclulation. The most it does is convert celcius input to Kelvin value. The formula for that conversion is still valid at -100 C.
Antworten (1)
KSSV
am 30 Mär. 2021
If X, Z are your Temperature and Relative Humidity arrays, use:
Td = X-((100 - Z)/5.) ;
0 Kommentare
Siehe auch
Kategorien
Mehr zu Text Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!