From: Lucie Duprat on 20 Jul 2010 06:04 I have to read a folder with matlab which begins like this: (.txt) Operation: ConScan Scan tech: Conical TARGET: Unknown Measurement N.: 2 Scan Parameters: 0.009979;20.000000;39;500;TRSIM2;0.063000; Max Wind: 0.000000 #Timestamp(DOY); Azimuth; Elevation; Signal; 22107.3549456019;+060.0118;+040.0058;-40.390; 22107.3549513889;+060.0111;+040.0075;-40.421; 22107.3549571759;+060.0096;+040.0086;-40.420; And I just want to read the figures: time, azimuth,elevation and signal. I have just discovered Matlab this month but I began to write something to do this: function [Time,Azimuth,Elevation,Signal,Radius] = reading_signal2 Time=zeros(39,1); Azimuth=zeros(39,1); Elevation=zeros(39,1); Signal=zeros(39,1); Time(1,1),Azimuth(1,1),Elevation(1,1),Signal(1,1) = textread ('folder_name.txt', '%16.10g%9.4g%9.4g%7.3g','delimiter',';','headerlines',11) ; for i = 2 : 39 Time(i,1),Azimuth(i,1),Elevation(i,1),Signal(i,1) = textread ('folder_name.txt', '\n%16.10g%9.4g%9.4g%7.3g','delimiter',';') ; end Radius = textread ('folder_name.txt', '\n\n\n\n\n%*14d%*9.4g%*9.4g%*9.4g%*9.4g%*9.4g%*9.4g%6.4g') ; Time Azimuth Elevation Signal Radius I have some errors: >> reading_signal2 ans = 0 ans = 0 ans = 0 ??? Badly formed format string. Error in ==> textread at 177 [varargout{1:nlhs}]=dataread('file',varargin{:}); Error in ==> reading_signal2 at 8 Time(1,1),Azimuth(1,1),Elevation(1,1),Signal(1,1) = textread ('signal_pos_1_X_R_2010-07-12-08_31_27.txt', '%16.10g%9.4g%9.4g%7.3g','delimiter',';','headerlines',11) ; Can you help me please???
From: us on 20 Jul 2010 06:16 "Lucie Duprat" > ??? Badly formed format string. > > Error in ==> textread at 177 > [varargout{1:nlhs}]=dataread('file',varargin{:}); > > Error in ==> reading_signal2 at 8 > Time(1,1),Azimuth(1,1),Elevation(1,1),Signal(1,1) = textread ('signal_pos_1_X_R_2010-07-12-08_31_27.txt', '%16.10g%9.4g%9.4g%7.3g','delimiter',';','headerlines',11) ; > > Can you help me please??? well... for starters: you need brackets around your output args... us
|
Pages: 1 Prev: Inport structure Next: Filled / transparent contourslice |