how to generate high dimensional/spherical dataset in matlab? - matlab

As a part of my project I need to generate high dimensional non linear dataset / spherical dataset...I am using Matlab to generate it...I have tried using randn,surf and plot3 functions ..I referred
http://in.mathworks.com/help/matlab/math/numbers-placed-randomly-within-volume-of-sphere.html
I got the output but I dont have any clear idea....Can anyone help with this or suggest how to generate the dataset mentioned .. like any function?.Also I would like to view the dataset like by using plot or something.....Thanx in advance...

Related

Matlab Scatterplot showing relation between two arrays w/ 10 datapoints in each?

I am trying to get a scatterplot like the one seen below in matlab: But I absolutely cannot get any matlab scatterplot techniques to collaborate with me in the slighest.
I have used my data to create boxplots with no issue, so suppose there is something wrong with my plotting approach.
My code currently looks like this:
Data = readtable("Dataset.xlsx"); gscatter(Data.Var1,Data.Var2)
Anyone got any guides or code advice that can help me create the intended plot?
Thanks ahead.

Plot multiple probability distribution function lines on one plot in MatLab

I'm new to matlab and am trying to work with three dimensional data. It has latitude, longitude and time as the three dimensions, and I want to create a PDF for each of these matrices and then put all of them on the same plot rather than have three separate PDF plots. I don't know how to create reproducible data for matlab for this question so if there are more questions I can provide more guidance (also would be happy to hear guidance about how to create reproducible 3 dimensional data).
Essentially I need help creating a probability distribution function for three dimensional data, and then I want to plot multiple PDF lines on the same figure.
I've tried using the histogram function and normplot() but neither has worked.

topoplot in matlab: 2D visualisation of EEG data

I want to make topomap using EEG data.
I used EEGLAB toolbox.
It can make only interpolation form (figure 1).
I want to like this topomap (figure 2).
I already changed many option of EEGLAB's topoplot function.
But, I couldn't find it.
Is there any method of make that kinds of topomap using matlab?

k-means algorithm for energy data against time and date

I am using Matlab 2015a.
I have got electricity consumption data to cluster it. Initially i am trying to cluster it against hours and dates. I have created three different variables, one for time, one for dates and third for data. I am unable to understand how should i combine these in a matrix form so that the loads are distributed according to time? Then i have tried to look how can i plot a line graph for k-means but i can only find scatter command graphs but no line plots.
Further how can i plot it as a 3-d plot?
Further at a later stage i want to include temperature variable aswel. But when the 4th variable is involved, what will the plot be? will it still be 3-d?
Any suggestions, links?
In Matlab you can create N-dimensional matrices, so you can arrange your 3D data in a N*M*3 matrix (you might want to look for the cat() function to help you out).
There are several functions that allow you to plot in 3D, one of these is scatter3() which is perfect for K-Means clustering. I don't really understand which lines you do want to plot: K-Means is about clusters and centroids (i.e. points).
If a 4th variable is involved, you can as well create a 4D matrix. Although I reckon plotting a 4D graph isn't going to be easy. A first approach might be using several colours for your scatter points with different colours for different temperatures (or temperatures range). In this case the 5th input argument for scatter3() will be helpful.
Help for scatter3() here.
Help for cat() here.

Plotting a Histogram in Matlab with Descriptive Statistics

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.