Community Profile # Matthew Worker

14 total contributions since 2013

View details...

Contributions in
View by

Question

What is a simple code for the chapman cycle involving only hydrogen and oxygen.This code should produce a curve but it only produces straight lines?
function Chapman_cycle y0= [2e17 1e-6 5e12]; tspan=[0 100]; %tspan=[0,1.0e-5,1.0e-3,0.1,0.5,1,2,4,6,8,10,20,30,40,50,...

1 year ago | 1 answer | 0

### 1

Question

How do I display individual values from an if statement in a messgae?
Ok bear with me. I am trying to write a script that gives the root to a function using the bisection method. However it is no...

1 year ago | 1 answer | 0

### 1

Question

How do I count how many iterations my root is in a smaller interval?
In my code I need to display in the command line how many of the iterations my root was in the smaller interval. I am not entire...

1 year ago | 1 answer | 0

### 1

Question

Subscript Indices must either be real positive intergers or logicals - not sure where i'm going wrong.
I am trying to call the RK4 function below in order to find the second initial value for my main function. However it gets stuck...

1 year ago | 1 answer | 0

### 1

Question

Hello can someone show me a simple code to show the earths orbit around the sun using ordinary differential equations.
function Earthsorbit e=2; y0=[1 2*pi 0 -pi]; tspan=[0, 10]; options = odeset('RelTol',1e-4,'AbsTol',1e-4); ...

2 years ago | 2 answers | 0

### 2

Question

Creating a matrix where the entry in the second column is (weakly) less than the entry in the first column
Hello, I would like to create a matrix where the entry in the second column is less than the entry in the first column: ...

2 years ago | 1 answer | 0

### 1

Question

I would like to write a script that download xml files from https://www.treasurydirect.gov/xml/ with the file name that s...

2 years ago | 2 answers | 0

### 2

Question

How to include the integral of a certain function in another .m file function?
I have fun1.m file that I want to include in it the integral of cos(x) provided that the integral of cos(x) has to be in a dif...

2 years ago | 1 answer | 0

### 1

Question

For Loop Not Executing
Hi all! Consider the following example: h=(2/1000); for i=8*h+h:h:9*h i end i = 0.0180 And sim...

3 years ago | 2 answers | 0

### 2

Question

If values are approxximately the same plot one function, if not plot two
Hello, I have a two vectors with calculation results. Has someone of you an idea how can I compare results of this two vectors ...

4 years ago | 1 answer | 0

### 1

Question

Mysterious error using array division in a for loop
I need to make a for loop in MATLAB to divide each column in a matrix by a separate column vector. I only want to do this for a ...

4 years ago | 1 answer | 0

### 1

Question

How to store matrix data (Imaginary) from a loop
Hello, In my project I have a loop and each iteration gives me a matrix with imaginary values: for fi = 0:10000:110000...

4 years ago | 1 answer | 0