How to plot below multivalued function
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
2 Kommentare
the cyclist
am 15 Aug. 2019
What does the notation [0,x/4] mean here. Does that mean in the range x in [0,1], there is one function that has constant value 0, and another function has value x/4?
Antworten (2)
John D'Errico
am 15 Aug. 2019
But it is not a function, in some standard mathematical sense of the word.
In there, we read "In mathematics, a function[note 1] is a relation between sets that associates to every element of a first set exactly one element of the second set."
You have some general mapping that takes an input number, and produces a set of results for any input. I don't know how complicated the output set might be, because your example is surely just an example. People rarely ever actually post what they really want to plot, instead making up some trivial example.
In the case of the problem you posed, I would just determine the set of outputs as a polygonal region, then use a tool like patch or fill to plot it.
For example, here on the interval [0,1], the region to be plotted is a simple triangle. For x > 1, the region is one that has one straight edge, and another curved one, but it is trivial to generate a polygon that will be sufficiently smooth.
Note that the boundary, at x==1 is important, because computers cannot handle strict inequalities well, especially for just a plot. You you would plot that region for x on an interval like [0,5], perhaps. If you go out too far, then you will not see the tiny triangle between 0 and 1 in the plot. Regardless, the result will be trivial to create, and it is completely your choice how far out you will go.
Why you want to do this is purely up to you. But the plot itself is trivial to build.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Surfaces, Volumes, and Polygons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!