フィルターのクリア

How to do discretization with variable step size ?

8 ビュー (過去 30 日間)
Adnan Hayat
Adnan Hayat 2021 年 1 月 27 日
コメント済み: Adnan Hayat 2021 年 1 月 28 日
Hello everyone,
I have an axis, suppose,
0_____________________10_____________________20
I have to define a vector x, such that from 0 to 10, I have to keep a step size dx0 and from 10 to 20, the step size should be dx1. Could anybody suggest how to handle it ? This vectoe x will be provided via 'for' loop to the PDE to be solved.

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 1 月 27 日
as simple as this :
dx0 = 1;
dx1 = 2;
x = [(1:dx0:10) (10+dx1:dx1:20)];
  1 件のコメント
Adnan Hayat
Adnan Hayat 2021 年 1 月 28 日
Thank you Mr. Noe ! :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBoundary Conditions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by