Hi all,
I have this file mat.txt with cell array format:
year,month,day,hour,hst,doy,TempAvg,TempLow,TempHigh,HumAvg,HumLow,HumHigh,BaroAvg,BaroLow,BaroHigh,Windspeed,Gust,WindDirection,IntervalPrecip,SolarRadiationAvg,InsideTempAvg,InsideTempLow,InsideTempHigh,HeatIndex,WindChill,DewPoint,StationVoltage,wetbulb
I want to put the text above to the in the fucntion:
function textread(file)[year,month,day,hour,hst,doy,TempAvg,TempLow,TempHigh,HumAvg,HumLow,HumHigh,BaroAvg,BaroLow,BaroHigh,Windspeed,Gust,WindDirection,IntervalPrecip,SolarRadiationAvg,InsideTempAvg,InsideTempLow,InsideTempHigh,HeatIndex,WindChill,DewPoint,StationVoltage,wetbulb] =... textread(file,'%f %f %f %s %f %f %f %f %f %f %f %f %f %f %f %f %f','delimiter',',');
Can you help me to write code to copy text in txt file and paste it in the textread fuction?
I tried to use fprintf, textscan but it doesn't work with mix text like this
Thank you so much
Best Answer