[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
opening txt-file,script under octav
From: |
kathy_plotnikova |
Subject: |
opening txt-file,script under octav |
Date: |
Wed, 2 May 2012 12:18:49 -0700 (PDT) |
Hello dear everyone!
Let me aplogyse please for my level of aknoweledge. I am very new in Octav,
and previosly I have never written a script, but now I have a lot of data so
I really have to do it.
In my script I need to create an array with data from the 9th row of every
data file I have. So first of all I tried to work with one file, called
k1.csv. Thus I wrote script called palscol.sh:
#!/bin/bash
#include <stdio.h>
fid = fopen('k1.csv','rt');
Z = textscan(fid,9);
fclose(fid);
echo "Z is $Z";
But I got an error
./palscol.sh: line 3: syntax error near unexpected token `('
./palscol.sh: line 3: `fid = fopen('k1.csv','rt');'
I spent almost all day trying to go throught this but unsuccessfully..
So I will be extremelly glad if you will find a little time to have a look.
And also, is it possible to work wirk with txt data files instead of csv
data files?
Best regards,
Kathy, Master Student in the General Physics Institute, Moscow.
--
View this message in context:
http://octave.1599824.n4.nabble.com/opening-txt-file-script-under-octav-tp4604195.html
Sent from the Octave - General mailing list archive at Nabble.com.
- opening txt-file,script under octav,
kathy_plotnikova <=