Why doesn't quiver work for this function?

8 vues (au cours des 30 derniers jours)
Ryan
Ryan le 23 Juin 2014
I have been trying everything and nothing is working. The only way I can get any kind of vector plot is if I delete the ratio at the end of the equation which I don't want to do. Please help.
[X Y]=meshgrid(0:.2:2,0:.2:2);
dY = .75*Y-.005*Y.^2-((1.5*Y.^3)/(1.25+Y.^3));
dX = ones(size(dY));
quiver(X,Y,dX,dY)

Réponse acceptée

Star Strider
Star Strider le 23 Juin 2014
‘The only way I can get any kind of vector plot is if I delete the ratio at the end of the equation which I don't want to do.’
The only part of the equation you didn’t vectorise is the division. This statement works for me:
dY = .75*Y-.005*Y.^2-((1.5*Y.^3)./(1.25+Y.^3));
% ADD ^ ‘.’ HERE

Plus de réponses (1)

SRI
SRI le 23 Juin 2014
Hi Ryan There is nothing problem in your coding because iam able to receive plot from your code
clc;
close all;
warning off
[X Y]=meshgrid(0:.2:2,0:.2:2);
dY = .75*Y-.005*Y.^2-((1.5*Y.^3)/(1.25+Y.^3));
dX = ones(size(dY));
quiver(X,Y,dX,dY)
  2 commentaires
Ryan
Ryan le 23 Juin 2014
I am still only getting dots everywhere. I am on a Mac using R2013a student edition. Are there any settings I need to change?
SRI
SRI le 23 Juin 2014
Hi Ryan I am working in windows Os having the same edition, the code which you have displayed above will result the dotted matrix only, better you keep trying by placing the break points in your code
so that you can understand the meaning of the code

Connectez-vous pour commenter.

Catégories

En savoir plus sur Vector Fields 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