Question

matlab loop code to save figures

I have the code below. It works fine. Notice the filename. It starts with dr_1e-1. I have other files that go up to dr_1e-9. Is ...

4 years ago | 1 answer | 0

Question

Creating a variable from part of a string

I have a string: x='dr_1e-2_A1_OFF_A2_OFF.txt'; Is there a way to create variables from this string? How can I set ...

4 years ago | 1 answer | 0

Question

creating subplot from function

I have some code, generally looks like this: x='dr_0.01.txt'; foo(x); function y = foo(fname) Do stuff...

4 years ago | 1 answer | 0

Question

Find all values within a given tolerance of 0

I have a matrix, called "difference". "difference" is 139x101. I would like to output the column numbers (i.e. somewhere between...

4 years ago | 1 answer | 0

Question

Plotting a surface with scatter data

I have density which is a 310x1 matrix. I have pressure which is a 310x41 matrix. Each column corresponds to a different temper...

4 years ago | 1 answer | 0

Question

diff vs. gradient

Why does: diffpressure = gradient(pressure)./gradient(density); and diffpressure = diff(pressure)./diff(density...

4 years ago | 1 answer | 0

Question

Differentiate and store results in matrix

I have two matrices. The first matrix is Density and it 311x1. The second matrix is Temperature and it is 311x21. The column in ...

4 years ago | 1 answer | 0

Question

creating new matrix based on column value

I have a data file that is 3 columns (Density, Temp, Pressure) I generate the data using C++ and it loop through all possible...

4 years ago | 1 answer | 0

Question

Matlab loop through 100 files and add line of text (Depending on file number)

Hello, I have 100 files, labeled 1,2,3,4...100 I want to add a line of text to each file depending on the file number. I h...

8 years ago | 0 answers | 0

Question

MATLAB object only shows on plot if greater than certain value found in matrix

I have code that plots the objects in a 3D scatter graph. Some objects move, so I have a color scale to show which ones move fur...

8 years ago | 0 answers | 0