help with slope field in matlab

4 vues (au cours des 30 derniers jours)
abdullah X
abdullah X le 20 Juin 2021
Réponse apportée : KSSV le 22 Juin 2021
y' = (1+x)/y
in -1<=x=<1 and -2<=y=<2 with step size 0.2

Réponses (1)

KSSV
KSSV le 22 Juin 2021
  1. Create x, y vectors using linspace
  2. Creat X, Y matrices using meshgrid with x, y vectors as input.
  3. Substitute X, Y in your formula. You need to use element by element operations here.
  4. USe gradient to get slope.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by