How to do discretization with variable step size ?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Adnan Hayat
el 27 de En. de 2021
Comentada: Adnan Hayat
el 28 de En. de 2021
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.
0 comentarios
Respuesta aceptada
Mathieu NOE
el 27 de En. de 2021
as simple as this :
dx0 = 1;
dx1 = 2;
x = [(1:dx0:10) (10+dx1:dx1:20)];
Más respuestas (0)
Ver también
Categorías
Más información sobre Boundary Conditions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!