Community Profile

photo

g


Last seen: quasi 4 anni fa Attivo dal 2018

Followers: 0   Following: 0

Statistiche

  • Thankful Level 3

Visualizza badge

Feeds

Visto da

Domanda


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'); ...

quasi 4 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

circa 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

circa 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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 ...

oltre 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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 ...

oltre 4 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

oltre 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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 ...

oltre 4 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

oltre 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

oltre 4 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

oltre 4 anni fa | 2 risposte | 0

2

risposte

Domanda


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 ...

quasi 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

quasi 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

circa 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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 ...

circa 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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' ...

circa 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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

circa 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

circa 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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 ...

circa 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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 5 anni fa | 1 risposta | 2

1

risposta

Domanda


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 5 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

oltre 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

oltre 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

oltre 5 anni fa | 1 risposta | 1

1

risposta

Domanda


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...

oltre 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

oltre 5 anni fa | 1 risposta | 0

1

risposta

Domanda


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...

quasi 6 anni fa | 1 risposta | 0

1

risposta

Domanda


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. ...

quasi 6 anni fa | 1 risposta | 0

1

risposta