# g

**Statistics**

**MATLAB Answers**

**29** Questions

**0** Answers

RANK**8.062**

of 263.048

REPUTATION**4**

CONTRIBUTIONS

**29** Questions

**0** Answers

ANSWER ACCEPTANCE **
44.83%
**

VOTES RECEIVED**3**

RANK

of 18.002

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 113.971

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Question

Writing row vectors to file

I am currently using the following scheme to write the row vectors Vec_A and Vec_B to a file: fid = fopen('myfile.dat','wt'); ...

oltre 2 anni ago | 2 answers | 0

### 2

answersQuestion

Iterating over values in multiple arrays

Let's say I have an array A defined as A = [0 2 5 7 8] Let's say I haven array B defined as B = linspace[0,10,100] Now I wan...

oltre 2 anni ago | 1 answer | 0

### 1

answerQuestion

Performing calculations (Newton's method) over values in loop

I am trying to perform Newton's method over a series of values given by the array p_init. I am trying to perform Newton's metho...

oltre 2 anni ago | 1 answer | 0

### 1

answerQuestion

Renaming files in directory that meet array criterion

Let's say I have some files in a directory my_directory: file_23.txt file_35.txt file_37.txt I'm reading the files through ...

circa 3 anni ago | 1 answer | 0

### 1

answerQuestion

Check if values in array fall within certain integer of values in another array

Let's say I have a set of numbers in array A 11 22 35 41 and another set of numbers in array B 3 11 45 I want to check ...

circa 3 anni ago | 2 answers | 0

### 2

answersQuestion

Renaming files if they meet certain array conditions

I have some arbitrary files in a directory "my_directory": file_1002.txt file_1012.txt file_1023.txt file_2045.txt each wit...

circa 3 anni ago | 1 answer | 0

### 1

answerQuestion

Extracting values from file names to array

Let's say I have a directory "mydirectory" and in it, I have some files file_234.txt file_356.txt file_567.txt file_987.txt ...

circa 3 anni ago | 2 answers | 0

### 2

answersQuestion

Determine whether file value is within certain integer of an array value

I have some arbitrary files in a directory "my_directory": file_1002.txt file_1012.txt file_1023.txt file_2045.txt each wit...

circa 3 anni ago | 1 answer | 0

### 1

answerQuestion

Counting values between values in array

I have a variable, call it var, containing thousands of rows of numbers, like so: 123 124 125 128 % some values skipped 129...

circa 3 anni ago | 1 answer | 0

### 1

answerQuestion

Forcing matrices to match in size

Let's say I have two single-row matrices A and B. I want to check if A and B have the same number of columns. If they do, do no...

circa 3 anni ago | 2 answers | 0

### 2

answersQuestion

Why is my if statement breaking when condition is not met?

So I have a program that sets verbose to either 'true' or 'false' I have the code if (verbose == 'true') fprintf('VERBOSE ...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

Ignoring comments in lines when parsing

I am parsing a file with the following code: C = textscan(fid,fmt,opt{:},'CommentStyle','#'); This works in ignoring comments...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

Importing data from a file in a specific way

I have a file with 3 columns of data. Here is just a sample of what the data looks like (there are many more rows): 265.545555...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

Passing values to Bash script

Let's say I have a matlab file that calculates some values, giving: alpha = 7 beta = 9 Now, I want to pass these values to a ...

oltre 3 anni ago | 1 answer | 0

### 1

answerQuestion

Replace regular expression in file name

I want to use regular expressions replacement for file names in the following way. Say I have a string '/home/directory1/sub' ...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

Ignoring comments when parsing

I am currently parsing a file using the following scheme. fmt = '%s%s'; opt = {'Delimiter','='}; [fid,msg]=fopen(file,'rt'); ...

oltre 3 anni ago | 1 answer | 0

### 1

answerQuestion

Running Matlab script from another directory

I currently have a script with the following line. What it does is opens matlab and passes the file to mymatlabscript, then exit...

oltre 3 anni ago | 1 answer | 0

### 1

answerQuestion

Skipping elseif when first condition is true

I currently have the following scheme: if (a =0) q = 4 elseif (b=0) q = 5 rest of code end The problem is, in the case ...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

Printing just one column in text file in scientific notation

I am creating a text file with two columns of data using the following scheme: data = [a b] datafile = sprintf('file_%s.txt',l...

oltre 3 anni ago | 1 answer | 0

### 1

answerQuestion

Questions about producing text file with data

I have some data that contains two columns, and I want to print that data to a text file. This is my current scheme: fileID = f...

oltre 3 anni ago | 1 answer | 0

### 1

answerQuestion

Creating text file with columns of data

How do I create a text file with two columns of text correspond to columns of data? I currently have data = [a b]; % a and b ...

oltre 3 anni ago | 1 answer | 2

### 1

answerQuestion

Making one structure out of two structures

Let's say I have two structures. D = [strtrim(C{1}),num2cell(C{2})].'; F = struct(D...

oltre 3 anni ago | 2 answers | 0

### 2

answersQuestion

How to parse variables independent of order

I am currently opening a file and parsing arguments in the following way: ReadParam = 'h0 = %f f0 = %f'; fid = fopen(file); p...

circa 4 anni ago | 1 answer | 0

### 1

answerQuestion

How to pass file from Bash script to MATLAB script

I have a bash script that creates a config file of varying name and then runs a Matlab script through the following: (config fi...

circa 4 anni ago | 1 answer | 0

### 1

answerQuestion

Editing values in Matlab script from Bash script

Let's say I have a script called Histogram.m that performs a variety of functions. It has a variable named Detect that can be...

circa 4 anni ago | 1 answer | 1

### 1

answerQuestion

Indexing values, selecting a range, and outputting values

Let's say I have two sets of data. A = [1 2 3 4 5 6 7 8 9 10] B = [4 5 2 8 9 0 1 0 4 6 ] Let's say I only care about va...

circa 4 anni ago | 1 answer | 0

### 1

answerQuestion

How to pick and subtract specific elements in matrices

Let's say I have four sets of data (a,b,c,d). Arbitrary values chosen. a = [1 2 3 4 5 6 7 8 9 10] b = [0 4 2 8 5 5 6 2 1 9...

circa 4 anni ago | 1 answer | 0

### 1

answerQuestion

How to plot separate scripts into one plot

If I have two Matlab scripts, for example "apple.m" and "ball.m" that plot with the same axes (just different data), etc. how ca...

circa 4 anni ago | 1 answer | 0

### 1

answerQuestion

How to Open Script from Directory in Matlab

Hello, I am new to Matlab, so I am wondering how to open a script in a directory in Matlab. The directory is on a server. ...

oltre 4 anni ago | 1 answer | 0