I am trying to read and display the content of a text file in Fotran 90 to make sure that fortran is interpreting the data correctly. Eventually I want to store the data in an array so I can calculate averages, but at the moment I am still working on getting the data displayed in Fortran. I've...
I have a need for software that will convert a .PDF Adobe Acrobat Version 8 file to text that can be imported into MS Word. I do not want a scanning imaging solution, for instance MS Word, Document Imaging. Too many scan errors can result, slowing things down, because of scanning errors that...
I've been given a data file laid out as such:
heading1 heading2 heading3
x1 y1 z1
x2 y2 z2
x3 y3 z3
.etc.
where x=integer, y,z=real
I need to count the number of lines to allocate x, y and z their sizes. My first attempt looked like:
...
OPEN(21, FILE='data.dat', STATUS=OLD)...
Hi...
Me too new to this concept. I too want to load a .m file by pressing the button in the GUI.
I am the beginner to matlab. I have added 3 buttons to my gui and if i click on the first button means then i want the .m file stored in the same directory be loaded and automatically that .m...
Hi,
I'm trying to create a histogram of a .nii file but it's now working.
1. loading the nifti file:
>> Try2=load_nifti('DM.nii');
2. hist(Try2);
that generarates a histogram, where most of the values are concentrated between -150 and 200.(3 bars,the middle one is between -50 and 100).
3...
Can a File object alone be used to read a file?
I am thinking it is no because don't you have to use the scanner class to get the data from the file?
I have tried looking for this online but haven't been able to find the answer.
Homework Statement
How do I retreat the last entered data from .txt file ?
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
void menu(int *);
void option(fstream &, int *);
int main()
{
int a, p;
while(a== 1||2||3||4||5 )...
Homework Statement
I think it runs up to the couts I have in my input function but then it just crashes. I'm running it on DevC++. The code is in [b]3 along with the assignment link. It's assignment 11 that I'm working on and the text file is next to the link for the assignment. I would...
This isn't exactly part of my homework but I wanted to know how I could save the output of this program to txt file?
The program was my homework and it was to allow the user to enter the starting values for a multiplication tables columns and rows and print a 10x10table
I did it like so...
Homework Statement
Write a program that takes a file name as argument and counts the number of words and the number of characters (without spaces) in the document.
Homework Equations
The Attempt at a Solution
How exactly should my program take a .txt file as an argument? Do I simply:
String...
Homework Statement
I've implemented RSA and just need to print some stats and write to files.Homework Equations
My solution works fine when I provide an input file, however, if I let it read from standard input there is no output written to either of my output files. Reading works regardless. I...
I was trying to write code that would read integers stored in a file, line by line and then save them to a list and average that list and display it, it didn't work. What can I do to correct this code, I believe that the error is in how I am treating the list but I am confused at why the...
Dear Fellow Members,
I am presently trying to write a Fortran 95 program to
separate acids from a list of chemicals in a text file and
then write them to a second text file. The program first
matches the word "acid" and is then supposed to check if
the word preceding the word...
Hi everyone
I am completely new to the Fortran. I have to make a program in fortran 90 to either add or multiply the matrix on user demand and ask user to enter the file name inorder to read the desired matrices.
I came up with the the following code which does not read the program and...
Hi everybody,
I have 3 columns of data (3 different variables) and 400 rows. How would I set up a matrix/array sort of thing to read each row individually and store it in my fortran program to calculate equations at each step?
What I have basically tried and can't get to work, I think it...
Hi there,
I am trying to make a Fortran90 program that open files with this pattern:
1a041.dat
wp2d2.dat
qad33.dat
mntf4.dat
erh55.dat
...etc.
so the first four digits I want to consider them as a variable character, then it comes an integer value that increases by one for every...
Hi,
I have a nc.bz2 file and am trying to unzip it using Windows. I'm not paying for software as I'm sure there are ways to do it without doing this or installing Unix on my computer.
Can anyone help?
Hi,
I have a MATLAB function m file and I want to integrate the function.
function y = myfun(t,a,b)
y = (1/(2*pi)).*(1./t)*(1i*(a+b));
endThen when I call the integration in MATLAB I don't know how to specify a and b whilst integrating over t.
I need to be able to set a and b outside of the...
I am working in FORTRAN
I need to avoid writing to the same file at the same time while working in a parallel environment.
I have a program (that I have not written and cannot edit) that calls a subroutine (that I have written and can edit). The subroutine is called over and over again by...
I would like to run a calculation so that when it has converged, a song will play... to alert me from the other room (for example).
http://www.mathworks.co.uk/help/techdoc/ref/audioplayer.html
I found this but can't quite put it together? Their example was:
Examples
Load and play a...
Homework Statement
Perform file IO with 3 reader and 3 writer threads using a circular buffer. Read the (text) file in and write the same file out.
The Attempt at a Solution
I have an assignment that requires me to use multiple (3) threads to read data from a file, and multiple threads...
Hi I am novice to programming and trying to read each character from file till white space [next line / space] and append symbols to the read characters.
example:
say I have string
how are you
doing sir
then I should read it into char buffer as
char buff =...
hi want to read the rows of a matrix from a file which are written in the following way :
(2:1,3), (4:3,1), (2:1,8)
i am working in java, i am not able to figure out how to do this using bufferedreader :(
can someone help?
Thanks
Hello guys. I want to save the numbers between 0 and 1 with 0.01 increasement to a dat file. I wrote a code for this using Fortran however, after a point I get 0.314999 instead of 0.315000. Can you help me to solve my problem?
<code>
REAL, DIMENSION(:), ALLOCATABLE :: Y
REAL STEP, JEND...
This is my problem:
I would like to read data (saved in a text file) from a file. My data is written in a matrix format (1,000,000 rows x 3 columns).
I want to read a data from a particular line, say row number 90,000.
Since the number of rows is large, it will be very expensive if I have to...
1) see pdf
for question 2 I'm unsure how to calculate the force at the fulcrum since its not in equilibrium. I thought maybe i would add the two forces together, but that doesn't seem right.
2) so this question asks for what forces need to be applied at points A and B and i understand...
I am newbie to programming , I am trying to write a program in c++ to read strings from the file until white space [ space/ newline] each time i encounter white space i append to the string read append a symbol "$" and push to the buffer. and for the same string append another symbol "(" and...
Is this really what higher education in our system has become? The students probably won't win, but at least they are increasingly raising awareness and do have a point:
http://news.yahoo.com/graduates-accuse-law-schools-scamming-students-021529890.html
Hello all. I am far from a programmer, but have found a lot of use out of a batch file that I found. The file is as follows:
dir /s*.*>dirlist.txt
This file, typed into a notepad file, then saved as a .bat file has worked perfectly on my XP system. I tried to use in in W7, and it just...
Hi All,
Let me preface by saying this is my first post, but I'm very glad to have found and joined what looks like a great community here. Also I have no Fortran experience, so please bear with my greenness:
I'm trying to resurrect and use a code written by another engineer in our...
Hello all,
I have a question concerning the best way to access random elements in a large file. I have a single data file of numbers, 12G in size with dimensions 1024x768x16384. My goal is to, as quickly as possible, load, say 16384 of those numbers into memory. Assume these numbers are not...
mp3 file plays with headphones but not on built in speakers??
This is driving me nuts. I have an mp3 file which plays fine on my PC at work, with or without headphones. But the same file on my home laptop only plays with headphones, not on the built in speakers--I get no audio output. (I...
My gfortran compiler gives me the following message when I try to open a file in order to read it:Fortran runtime error: No such file or directory
logout
The line in the program where this file is is written in this way:
OPEN(UNIT = 7, FILE = 'GPROP.DAT', STATUS = 'OLD')...
Hi everybody,
I have just joined this forum and I have a problem in fortran programming. I want to do a program in fortran where in the do loop it will read an input file from the first line upto a line and again it will go to the starting line of the file in the next loop and read...
Dear Programmers
I am having text file having huge data.
From the text file i would like to map the two numbers that are present in the same brackets and the values should not considered if they are present in different numbers.
say for example I want to map number "4758 & 3895" that are in...
I had installed FileZilla FTP freeware on my computer.
Later, I was unable to edit my HTML file (pushed wrong button?) Whenever I tried to open or edit it using Word (my only editor which now seems to accept HTML), the webpage would appear, rather than the text code. I am using Windows 7 on...
How can i transfer a text document (word, pdf or text file) from PC to TI nspire CAS. I am lost and need help. I have install TI software on my PC.
Thank you in advance for any help you can provide.
Homework Statement
I have to read a text file with fixed format as follows
The first column is supposed to be year, 2nd is month and 3rd is day
The file has following format: 4d 2d 2d f9.4 f9.4 f9.4 f9.4 4d 4d 4d 4d 4d 4d
2000 218 0.4546 0.2394 0.0761 0.1167 55 58 1 1...
Here's a part of my program in which I'm having an error while compiling:
open(unit=1,file="tabla.dat")
allocate (x(n),y(n),f(n))
do i=0,n
x=(2*i)/n-1
f=1/(1+25*x**2)
write(1,*)x,f
end do
do i=0,n
read(1,*)x(i), y(i)
end do
close(1)
I'm having the error with gfortran: "Fortran runtime error...
Does anyone know how to build a CONFIG file for DL_POLY? I have the manual, and it gives the format for the CONFIG files, but am I supposed to just pull particle speed and forces out of the air?
For some reason, my WS_FTP95 LE program (originally from Ipswitch) did not transfer to my new computer (with Windows 7).
To transfer, replace or update the program, would you have a direct link where I can get the program for free or do you have another recommendation?
Ipswitch does not make...
While playing around with the fglrx driver for AMD graphic cards I managed to completely destroy my system last night. (Tip: never play with the kernel after 11 pm.)
After reinstalling from a live CD, I have the OS up and running. Unfortunately, my /home partition was encrypted so the...
Hello
Does anyone know if it's possible to run an excel file in Simulink? I have a column with a variable in excel, and don´t know if there is a block that I can get in simulink to run this variable.
Regards
help me with this vector program
i want to create a program that will have an arraycalled array1[] of 30 sets of 3 one digit numbers i.e 804, 450,430 etc)
i will have 13 vector containersor arrays defined with a series of 3 one digit numbers. i want the program to find any series of numbers...
Homework Statement
Write a program that reads the time, temperature, pressure, and volume measurements from a data file like :
0900015001990700
1000019602210877
1100021202790925
1234034203221015
1300038803221121
1400044803241425
1503051303201520
1604055503181665
1700061303191865...
I'm trying to create a paper plane simulation in C and I'm trying to convert MATLAB code to C. Admittedly, I don't know MATLAB (and it's honestly been a while since I've done a lot of math), but I've been able to decode some parts of the following MATLAB code that I found online:
S = 0.017...
I use gcc to compile the code. When I run the program, I get segmentation fault (core dumped).
ranked_galaxies.txt:
# PGC Name RA DEC Mass Distance Diameter Tile_Number Rank_stat
37617 NGC3992 179.399700 53.374450 2.290868 22.909000 5.613000 1 2.51796409431e-05
62964 IC4837A...
hi...
program below just for example
integer i,j
do j=1,100
do i=55,78
if(i==j)then
print*,i,j
end if
end do
end do
end
if base on do loop theory,outer do will read 1st line of j then proceed to inner loop,then find if i==j,if true the program will print result and...