Community Profile

# Wenchen Liu

Last seen: 1 month ago Active since 2021

#### Content Feed

View by

Question

How can I a function on the interval
I got a equation: x+ln x = 0, and I want to plot it on the interval [0.1, 1] I have tried this code: f = @(x)x+log(x) fplot(f...

1 month ago | 1 answer | 0

### 1

Question

How can i find the error in the interpolant
This is what have done so far: and the graph of this code shows like this: I want to find the error between this two ...

1 month ago | 1 answer | 0

### 1

Question

How can I plot two functions in the same graph?
I have a code like this: fplot(@(x) cosh(x)) hold on p(x) = 0.6671x^3-1.7921x^2+2.7580x-0.089 fplot(@(x) p(x)) hold off ...

1 month ago | 2 answers | 0

### 2

Question

sums up the same rounded numbers in 5-digit decimal arithmetic in n = 10, 9, 8, ..., 3, 2, 1
How do I write a matlab code for this? since n is in a reversw order.

2 months ago | 1 answer | 0

### 1

Question

How could I sums up 1/n for n=1 to 10000?
I have a code like this, but I can't run it. n = 10000; % whatever you want sum_harm = 0; for i = 1:n sum_harm = sum_har...

2 months ago | 2 answers | 0

### 2

Question

how can I fix the code for Segregation Model and population?
I have a code like this: % model function schell(grid_size,percent_empty,percent_p1,percent_p2) grid_size = 50; percent_empty...

12 months ago | 0 answers | 0

### 0

Question

how to set up two different populations in a segregation model code?
I have a general code for the segregation model like the following: %% n = grid_size; grid_size = 50; n = grid_size; n2 = n^...

1 year ago | 0 answers | 0

### 0

Question

please find the formula for Newton's Method applied to finding roots of z^3 - 1, and apply it to the complex matrix 20 times.
I was stuck with how to use Newton's Method to find the roots. How would the coding be? Please help me with the code.

1 year ago | 0 answers | 0

### 0

Question

how can I create a complex matrix representing a grid of points with corners at -1 - i and 1 + i.
I want to know how to create a complex matrix representing a grid of points with corners at -1 - i and 1 + i. I was confused by ...

1 year ago | 1 answer | 0

### 1

Question

How to plot differential equations?
I have a few differential equations with given values , and I want to plot these equation. What should I do to plot? Because I h...

1 year ago | 0 answers | 0

### 0

Question

how do you define a matrix and its variable
I want to create a matrix , by i * j, in matlab, and then let matlab run this. I need to tell matlab what is i and what is j bef...

1 year ago | 1 answer | 0