Community Profile # HC98

Last seen: 10 days ago Active since 2018

#### Content Feed

View by

Question

How to assign a list of variables to an array efficiently
I have a list of variables: a = 1; b = 4; c = 7; d = 8; e = 9; And want to convert them into an array. It doesn't seem ...

12 days ago | 1 answer | 0

### 1

Question

poly1 gives error "insufficient data"
I'm using poly11 to fit some data and keep getting this error Error using fit>iFit (line 269) Insufficient data. You need a...

2 months ago | 0 answers | 0

### 0

Question

Using a loop to impose specific values
Let's say I have a range of x going from -200 to + 200 and I want to force a function to take different initial conditions in th...

2 months ago | 1 answer | 0

### 1

Question

How to specify a row and column in an array
So I have a 5x80 array and want to write a section of code which subtracts row 1, column 1 from row 2 column 1. How might I do t...

6 months ago | 1 answer | 0

### 1

Question

Fitting a plot with interpolation
I need to interpolate some data involving a logarithm using the fit function but I'm not sure how to interpolate in matlab. Gene...

6 months ago | 1 answer | 0

### 1

Question

Using Taylor Expansions: how to impose 'large' approximations, i.e., "for large x"?
Say I have a function: and I want to see what happens in the region of large x, i.e., I Taylor expad f(x) in the region of...

8 months ago | 1 answer | 0

### 1

Question

translating commands from python
So I'm trying to translate the following code from Python: def chabrier03individual(m): k = 0.158 * exp(-(-log(0.08))**2/(2 ...

2 years ago | 1 answer | 0

### 1

Question

Why does my <= statement not work?
I'm running a simple loop that applies a less than or equal to inequality to a value. Unfortunately, it is overlooking this valu...

2 years ago | 1 answer | 0

### 1

Question

Plotting the stellar IMF and setting for loop conditions
Hi all, I'm trying to plot the stellar IMF using MATLAB and want to transfer the following Pyhon code: m = logspace(-2, 2, 400...

2 years ago | 0 answers | 0

### 0

Question

My quiver plot seems to go flat when I am plotting a coupled ode.
So the ODE system reads: and my code reads: [x, y]=meshgrid(-2:0.6:4) dx = 3*(x-1)*y; dy = 2-x-y^2; quiver(x, y, dx, dy...

2 years ago | 1 answer | 0

### 1

Question

Getting a for loop to save a plot every step
Good evening, I'll keep this brief but I'm looking to see how I can write a for loop which takes a range of constants, appli...

2 years ago | 1 answer | 0