Forgive me if this sounds really stupid. I am a new Matlab user, and I have about 200 data sets from various samples in the naming format "varname_sample_daily" and i wish to remove the "daily" portion of it from the variable name through an automated process (i.e change all file names to just...
I am trying to make a tone file and it is working. but it is not sounding the way I want it to sound. There is a low tone beat in the file. that I did not add to it. And I do not know why it is there..
Someone told me to try fading out / fade in and not just going down to 0 and I did but it did...
I was searching around the internet for a procedure to read lines of a text file into a JavaScript array. Most of the procedures I saw used Ajax, which I don't understand yet, so I'll refrain from trying to cut-and-paste code that I don't understand.
I found this...
I have some F77 code and I am wondering if it is possible to inject external code into a separate file and call it without it being a subroutine, and placed into the code. An example would be :
a = 1 + 1
b = a + 1
c = b + a
a = c + b
d = 4 + a
and I want to take lines 3 and 4 and...
Hi all.
I have 1200 .dat files containing x,y,z . What I need to do is to open all the files and choose only one single point from all the files, in example point (x120,y120,z120) from all 1200 .dat file and save it into new .dat file. Can anyone teach me how to do that either in fortran or...
Hello guys!
There's an open source chess engine (Stockfish) that I really like and I always want the latest version. The project is so active that there's approximately a new version every day. I decided to make a script that auto downloads the code, auto compile Stockfish, auto move the...
Homework Statement
Hi! Greetings! I am studying how to use VASP or the Vienna Ab-initio Simulation Package. I'm starting to study the parameters in the INCAR file first.
According to the online manual, the ISMEAR parameter is one of those that are recommended to be manually set. The...
Hello guys,
I need help from you one more time. I have imported a STL file to marc and right now I have a problem. I would like to set this STL file as a rigid body but MSC Marc won't accept it as a surface (but it is a surface file). Do you have any clue how to solve it? Maybe this surface...
Thank you very much for the reply. I placed the file in the same directory as the program and opened the file before executing and everything was just perfect. But my other problem is that, in my data, there consists of negative numbers. Is there a way to read the positive inputs without the...
I am programming in fortran 90/95 and i have a problem opening an existing file for input. I have written the code without any errors, but at compilation time, the file to be read cannot open. It is as if the program does not know the location for the file. I would like to know if there is a...
My wife accidentally have the camera in video mode, she tried to take pictures but took a few seconds of video instead. is there any way to get picture out of it at the right moment. I understand the resolution will be bad, but those are important pictures, bad pictures are better than no...
Hi everyone, this is my first post on the physics forums. I am trying to use the readtable command in Matlab to make a table from an Excel file. Matlab is still new to me so I'm running into problems a lot. When I input T = readtable('myfile.txt'), I get an error that says "? Undefined function...
I can't figure out why my text file isn't being found. I have it saved in the same location as my project. Anyone know how I can set where XCode checks for an fstream object?
int main (int argc, char* const argv[]) {
std::fstream file1("CollegeIsAWaste.txt", std::ios_base::in)...
Homework Statement
This program must read two input files, one is a key that specifies the conversion of characters
the other is a text message that will be encoded based on the mapping specified in the key
files. The program must use the key mappings to both encode and decode the...
Hi y'all
I am trying to compare two files, so make one line from one file be compared to alll the lines in the other file until it finds a match where the difference is less than 0.003.
This what I had thought of, but I still think it is just comparing line by line, instead of one line to...
Hi all, I have a problem I'm trying to solve.
I have a code that has written a simple ascii text file like this:
write(ilun_out, '(E23.15,A,E23.15,A,E23.15,A,E23.15)' x, ' ', y, ' ', z, ' ', rho
So this provides a nice looking ascii file with four columns, separated by a small space. Now...
FORTRAN Problem! "Runtime Error: End of File"
Hey everyone, back again with another Fortran question.
I am getting the runtime error in Fortran "End of Line". I have tried to simply understand what this means, but I am not getting much help from Google.
I have pasted my code below, and...
Hey everyone,
I have written a Fortran code for a project I am working on, but am having an issue: I can't get the code to output my data to the file I have opened. Here is what I am trying to do.
I am setting up a Monte-Carlo code that selects a random x- and y-value. These values are...
I am trying to read a binary file using fortran.
this is how the binary file looks like.
1901 109.1000 241.4000 284.2000 121.9000
1902 104.0000 283.7000 202.6000 201.9000
1903 114.8000 293.0000 279.6000...
I need to open a Fortran program came along with the textbook on antenna. I can't attach the file. It is a .for ( dipole.for) program. The book said it need MATLAB which I don't have. Is there any free software to open this?
Thanks
Hey, guys
Can you please help me to spot mistakes in numerical solution of following diffusivty equation:
∂P/∂t= 0.001127*k/(μ*ϕ*c_t )*((∂P/∂x)^2*c+(∂^2 P)/(∂x^2 )).
Matlab give the following command:
Undefined function or variable 'r'.
Error in function_handle2 (line 9)
for...
I am using a MAC and have a download with a .msi file extension. Since I do not use Microsoft for my operating system, I can't open the file. Is there a download for this that I can get to open these files?
Are there any program that be be used to read a .CAM file and pull measurements from the program.
Where I work we cut some elliptical holes that must have their size verified before cut. It would be benefical to have a reader program that let's you view the plot (not just the code) and take...
I am quite new to the JavaScript and HTML5 world, and I am having trouble with some code that I was hacking together (based on demo's from other people). I am trying to take a file as input (a binary image) and base64 encode it. I think I have the right function for the base64 encoding, I...
Hi all,
I encounted a write file problem for Fortran 90. I appreciate it a lot if you can help me.
I open a file at the beginning of the program. Then everytime I rewind the unit number and write one new line to the first line of the file (the previous data on the first line is replaced)...
Fortran, File Read Error[Resolved itself, fixed]
Basically I'm writing a simple fortran program to read in a data file formatted as shown below and then calculate the line of best fit for the given data points.
N
x1 y2
x2 y2
. .
. .
. .
xn yn
Where N is the...
Hi there,
I am trying to read a universal file (*.unv) in fortran. The file is type 58b (mixed ascii and binary format). I can read the ascii part fine but am having trouble reading the binary part. Does anyone know of anywhere I can access some source code to read this correctly. I suspect...
So I just started teaching myself C++ using visual studio 2010. I started with a nice easy program.
First thing I did was created a new project called "Tutorial." Under source files I right clicked and selected add -> new item, I named it Introduction.cpp. I created this:
#include...
Im not exactly sure how encryption works, but, I think, it basically just scrables the alphabet, if you will. So somthing like "dusk" would become "ftjo" if red withot the decryption key. (of course, it is more complicated and in binary, but still..) Right?
So.. if so, and if encryption keyy...
I wrote a simple FORTRAN program to show my read problem. This works fine in windows. On the Linux machine I always get this eof error when I open a file and read. This means that every program I have written doesn't work :) The error is line 12 EOF. What is the problem? (I am using GFORTRAN in...
Hi there
I was sent a .nb file with calculations already done for me, for various inputs.
I was wondering how I can edit those inputs, keeping the rest of the calculations the same, to find out what the result would be?
(see attached file for example)
I can not read character "0A" in a bmp file with "Compaq Visual Fortran 6.6C"
Hi,
How to read character "0A" in a bmp file with "Compaq Visual Fortran 6.6C"
Here's an excerpt from bmp file:
42 4D 16 02 00 00 00 00 00 00 36 00 00 00 28 00
00 00 10 00 00 00 0A 00 00 00 01 00 18 00 00 00...
I have this code that i have been working on that will interpolate and integrate some data. I need to read this data from a file with unknown rows and columns to a two dimensional array/matrix so that the data can be broken down further into one dimensional arrays from the parent 2D array's...
Hi. I am doing a PhD atm and I have decided to take the plunge with gnuplot. I have fitted some data to an equation h(t)=ho+a(t-to)^b+kt, with a, to, b and k being fitting constants (empirical formulae describing creep behaviour of a compressed material with time).
Does anybody know how I...
I am trying to write code so a 2-d array is written to the hard drive (which is later to be read). There are several do loop iterations and I would like the file name to change with every iteration so I get as many files as there are loop iterations. I get one 1-d array that is named A, no...
I need to create a MATLAB function file that will accept a modulo values (from 3 to 9; that is Z3 to Z9) and will output the least possible value describe by the modulo conditions
I don't know how to start it because I am not allowed to use the mod() and rem().
Please give me an idea how to do...
Hello,
I'm wondering how to name/open a file whose name is given by a string with an integer appended at the end, i.e., something in the style of the following. Thank you!
int i = 5;
ofstream fout;
string s = "Hello " + i;
fout.open(s);
// write something to the file...
I am using a verlet algorithm in c++ to model the motion of a satellite, and want to output position and velocity data from each timestep so that I can then read it into MATLAB and plot graphs to see how well my model matches the 'real life' graphs. so far I have at the end of each iteration...
I have a question, how can I make an output file that takes the name of the input file and replaces the .txt extension with "_out.txt"?
For example, an input file with the name “new.txt” would result in an output file named new_out.txt”.
my friend told me to use strcat, but that just adds...
hi all,
Currently I am doing 2d fdtd (TMz mode) modeling. I expect to have output for Ez, Hx and Hy in one file, which is mean that the output will be in 3 column. But I don't have any idea how format it. Anyone can help me? Below is the code
!problem 3.9, Taflove chapter 3
!to model 2d...
Hello,
Am writing java, using netbeans,
For what should be a simple try.. catch with a while loop, I am getting the error.
i have an excel file with the strings i want to display. the file is all fine, checked to make sure no empty cells etc etc.
When i get to the second last element, the...
I am trying to read from a csv file, the file looks like below:
1,2,3
4,5,6
7,8,9
0
I used getline(Input_file,size,',') but the problem with this is that it seems to see the numbers not separated by commas as one string., for the code below i was expecting the following output:
1...