spatial grid points division

I have (N = 550) grid points starts from a = 0, to the end point b = 291.5. the spatial grid step is dx = 0.53. I want increase the grids between a and b by decreasing dx, without changing N.
Here the codes i used
N = 550; % number of grid points
x = linspace(a, b, N+1)'; % cell interfaces
dx = x(2) - x(1); % spatial grid step
xc = 0.5*(x(1:end-1) + x(2:end)); % centers of cells

3 件のコメント

Guillaume
Guillaume 2018 年 7 月 18 日
編集済み: Guillaume 2018 年 7 月 18 日
I don't understand what you want. If you decrease the grid spacing dx, the numbers of points N must go up or your end points must get closer. It's not possible to decrease dx without changing a, b, or N.
Ahmed Abdalazeez
Ahmed Abdalazeez 2018 年 7 月 18 日
But I can't change N, because the stability of the solution, otherwise the system will be unstable.
Guillaume
Guillaume 2018 年 7 月 18 日
By definition
dx = (b-a) / N
So again, you can't change dx without changing at least one variable on the other side of the equation.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDynamic System Models についてさらに検索

タグ

質問済み:

2018 年 7 月 18 日

編集済み:

2018 年 7 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by