フィルターのクリア

How to define a time period for my code?

7 ビュー (過去 30 日間)
Ara
Ara 2012 年 12 月 29 日
Hi Everybody,
I wrote a code to convert the azimuth and elevation angel to latitude and longitude and plot in circle symbol. I had two problems; 1- The column of my time (time1) start from 0-24h(for one day)and I want to read it just the period time 22-10, it means I do not want to read and plot the period time between 10-22. 2- I would like someone look at my code to make me sure it's correct. When I plot different data the figures doesn't much different which is a bit weird. Could you please help me?
Happy New Year to all of you!
  6 件のコメント
Jan
Jan 2012 年 12 月 30 日
@Ara: Much better now! Thanks.
Ara
Ara 2012 年 12 月 30 日
編集済み: Ara 2012 年 12 月 30 日
-Jan: You said much better, but I still did not receive any answer. Should I change another thing or just wait? In this code the column"time" give the time in UT and I just want to plot the daytime so I need to remove 10-22h (which are determine as local night-time).But I do not know how? should I define a threshold? To my knowledge, when I set the specific time I faced error. I also start to read the data just for specific data like data1nov=xlsread('1608_1.xls', 'A2753:AF5803'); % read data But this error comes out: ??? Attempted to access no_sat1nov(1); index out of bounds because numel(no_sat1nov)=0.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2012 年 12 月 31 日
It is not possible to "not read" data unless the file is binary and the amount of space taken up by the data to be skipped can be exactly calculated.
Excel might be able to handle doing it for .xls files -- but not for .xlsx files as those are too text-oriented.
My working assumption for Excel data of modest size (as yours is) is that Excel will probably end up reading the data anyhow, and that the best you rely on is that if you know exactly which rows you want, Excel will prune back what it returns to MATLAB.
If you do not know ahead of time the exact positions of what you want Excel to read, then if you are using MS Windows, you might be able to use ActiveX to command Excel to select only the rows where a column matches particular criteria.
  7 件のコメント
Walter Roberson
Walter Roberson 2012 年 12 月 31 日
No, data_filtered is the data, and reduced_time is a time vector. You might need to use reduced_data instead of data_filtered and use reduced_time instead of time.
Ara
Ara 2012 年 12 月 31 日
Thank you, it works well. Wishing you a great year ahead!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by