<div dir="ltr"><div><div><div>Hi ,<br></div>Sorry. Found a way to do. <br><br></div>Thanks,<br></div>Adv<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 29, 2015 at 4:57 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Ncl user,<br>This is the code I use to read csv file. I don't understand why it reads 23 column as single column. I tried to write it to new file and reading again . Then also I stuck with the same issue. I would like to extrack specific columns from this file. <br><br></div>Could someone help me? <br><div>Thank you<br>Adv<br><br>z1 = "minnesota50.csv"<br>nrow = numAsciiRow(z1)<br>ncol = numAsciiCol(z1)<br>ncol=1<br>;<br>data = asciiread(z1, (/nrow,ncol/), "string")<br>strs = asciiread(z1,-1,"string")<br>strs= str_sub_str(strs,"-9999","0")<br>strs=str_sub_str(data,","," ")<br>asciiwrite ("county1", strs)<br>z2 = "county1"<br>nrow1 = numAsciiRow(z2)<br>ncol1 = numAsciiCol(z2)<br>print(nrow)<br>print(ncol)<br>return<br>ncols = 23<br>nhead = 0<br>col=15<br>data1 = asciiread("county1",(/nrow1,23/),"float")<br>;print(data1)<br>dat=data1(0:1,2:2)<br>print(dat)<br><br><br></div></div>
</blockquote></div><br></div>