<div dir="ltr"><div><div><div>Hi,<br><br>I am interested in the following steps:-<br></div>1) I have a 2 D matrix where there are 133 rows and 12 columns called air<br></div>2) I want to c alculate trend between years which go row 1880:2012 and eachcolumn of air. <br>
</div><div>3) Error is unidentified z<br></div><div><br><br>;======================================<br>; create year<br>;======================================<br><br>  years=ispan(1880,2012,1)<br>  <br>;======================================<br>
; read data; add some meta data<br>;======================================<br><br>  diri   = &quot;~/Documents/PhD_June_2015/Data_AIR/&quot;<br>  fili   = &quot;air.txt&quot;<br>  air    =  readAsciiTable(diri+fili, nmos, &quot;float&quot;,2)<br>
  air@_FillValue = msg<br><br>  air@long_name = &quot;All India Precip&quot;<br>  air@units     = &quot;mm&quot;<br>                ; <br>  opt = True<br>  opt@fout = &quot;all_india_data&quot;<br><br>  write_matrix(air, nmos+&quot;f7.2&quot;, opt)<br>
;=========================================<br>;Doing trend analysis<br>;=========================================<br><br>do nmo=0,11<br>    z(nmo)=regline(years,air(:,nmo))<br>end do<br>  <br></div>;======================================<br>
; create year<br>;======================================<br><br>  years=ispan(1880,2012,1)<br>  <br>;======================================<br>; read data; add some meta data<br>;======================================<br>
<br>  diri   = &quot;~/Documents/PhD_June_2015/Data_AIR/&quot;<br>  fili   = &quot;air.txt&quot;<br>  air    =  readAsciiTable(diri+fili, nmos, &quot;float&quot;,2)<br>  air@_FillValue = msg<br><br>  air@long_name = &quot;All India Precip&quot;<br>
  air@units     = &quot;mm&quot;<br>                ; <br>  opt = True<br>  opt@fout = &quot;all_india_data&quot;<br><br>  write_matrix(air, nmos+&quot;f7.2&quot;, opt)<br>;=========================================<br>;Doing trend analysis<br>
;=========================================<br><br>do nmo=0,11<br>    z(nmo)=regline(years,air(:,nmo))<br>end do<br>  <br></div>