Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

plotting x and y differential

1 Ansicht (letzte 30 Tage)
Gavin Seddon
Gavin Seddon am 11 Mär. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
hello
I have plotted x and y data and seen evidence of a bifurcation. I want to plot x vs diff y.
this is what i did :
plot(nslogistic.x,diff(y))
this is what i got:
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.
is it possible to plot x data and y differential?
gs
  5 Kommentare
Gavin Seddon
Gavin Seddon am 12 Mär. 2020
yes thank you. can you tell me how to print diff y into a third column (v) ? i will perform the work on the .mat file to save you doing it.
GS
Turlough Hughes
Turlough Hughes am 12 Mär. 2020
Please upload the .mat file containing the variables nslogistic and y.

Antworten (1)

Raynier Suresh
Raynier Suresh am 18 Mär. 2020
diff(Y) function calculates the difference between adjacent elements of Y along the first array dimension whose size is not equal 1. But to find the derivative of Y with respect to X you can use diff(Y)/h where h is the step size in X, if X doesn’t have equal step size then you can use diff(Y)./diff(X).
While using plot function make sure that the data type of the input arguments must be one of these type single, double, int8, int16, int32, int64, uint8, uint16, uint32, uint64, categorical, datetime, duration
Referring to the following links might be helpful:

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by