I am trying to implement this plot
Any ideas or advice for how to implement a parallel coordinates plot in MATLAB?
Please see parallelcoords. Adding new Y-axis is done manually via line(...). Another way to make parallel coordinates plot is to use the function form SAFE Toolbox
If you have MATLAB R2019a or later, you can use parallelplot
If you have an earlier version of MATLAB and you have the Statistics and Machine Learning Toolbox, you can use parallelcoords
There are some other implementations on the MATLAB File Exchange, of which Interactive Parallel Coordinates is worth a look.
Related
I used optics.m function from http://chemometria.us.edu.pl/download/OPTICS.M to calculate optics algorithm in MATLAB. This function outputs RD and CD and Order vector of all points.
I used bar(RD(order)); code to display Reachability plot of them. But I want to index clusters of points and scatter them in MATLAB. How can i do that?
Don't use that code. It is slow, and I read somewhere here that it is even giving incorrect results?
But most of all, it lacks cluster extraction functionality; it is only half of OPTICS.
I'm not sure what command to use on matlab to plot the streamlines in a flow simulation. I used the command "contour" but it seems that it is not the right one.
I tried to use the commands "streamline" and "stream2d" but the starting points are really difficult to choose.
I found the solution it is "quiver" command (if case anyone needs this)
quiver command is used to generate vector field which predict the direction of velocity components while streamline command is used to generate streamlines. contour plot is basically a surface plot which can be used to plot stream function.
Is is possible to plot a histogram in MATLAB where the summary statistics are displayed in the histogram?
Here is an example of what I want generated in Mathematica
I've looked on the web but can't find an example like this in MATLAB anywhere?
You can use the text() function to add anything you want to a plot in MATLAB.
Alternatively, you can use textbp(), as pointed out by Daniel. textbp() will automatically choose the best position to place text.
How to generate the curve of transfer function:
G0(s)=exp(-s)*[(2s+4)/(s^3+5s^2+6s+4)]
using MATLAB and Simulink?
What kind of curve do you mean? Bode plot? Nyquist plot? Step response?
Use the tf function to create your transfer function with the InputDelay parameter to represent the exp(-s), see Models with Time Delays in the documentation for more details.
Once you have your transfer function, you can use functions like bode, nyquist, step, impulse, etc... to generate your "curve" of choice.
All of this requires the Control System Toolbox.
I am trying to learn the kernel density estimation from the basic. Anyone have the simple routine for 1d KDE would be great helpful. Thanks.
If you have the statistics toolbox in MATLAB, you can use the ksdensity to estimate pdf/cdf using kernel smoothing. Here's an example
data=[randn(2000,1);4+randn(2000,1)];%# create a bimodal Gaussian distribution
x=linspace(-4,8,1e4);%# need to evaluate density at these points
pF=ksdensity(data,x,'function','pdf');%# evaluate the pdf of the data points
If you plot it, it should look like this
You can also get the cumulative distribution or the inverse cumulative or change the kernel that is used. You can look up the list of options from the link provided. This should help you get started :)