Plot two discrete points in 3-D space [duplicate] - matlab

This question already has answers here:
plot a 3d point in MatLab
(2 answers)
Closed 7 years ago.
How can I plot these two 3-D points in Matlab?
P=[0.8061302526383115, 0.8122242071197412, 0.7836563734015345]
and
Q=[0.80612997, 0.81221923, 0.78366043]

Have a look here: https://www.mathworks.com/help/matlab/ref/scatter3.html
You can do:
scatter3([P(1),Q(2)],[P(2),Q(2)],[P(3),Q(3)])

Related

plotting deviation along all the values of x? [duplicate]

This question already has answers here:
xaxis/yaxis lines in matlab plot
(2 answers)
How to add a x-axis line to a figure? (matlab)
(6 answers)
Closed 3 months ago.
I want to plot the mean of a data measurement with the standard deviation along the x-axes. I tried using boundedline, but it is not working. I have just one value (y value) with the corresponding standard error to plot across the x values. Can someone know how to do it?
boundedline.m - File Exchange - MATLAB Central (mathworks.com)

how to find nearest grid points in the set of data points using matlab [duplicate]

This question already has an answer here:
Bilinear image interpolation / scaling - A calculation example
(1 answer)
Closed 6 years ago.
I have (x,y) points and how to find (x1,y1),(x1,y2),(x2,y1),(x2,y2) grid points in the set of data points(xi,yi)...
Have a look at ceil and floor.
They will round up and down a value, thus ceil(3.2) will output 4 and floor(3.2) will output 3. The right combinations of ceil/floor x and y will give all the points you need.

generate Pseudo-Noise sequence in matlab [duplicate]

This question already has answers here:
How to generate noise using specific variance
(1 answer)
Matlab: Generate noisy signal for particular SNR and particular variance
(1 answer)
Proper way to add noise to signal
(4 answers)
Closed 3 years ago.
I have question about adding Pseudo-Noise sequence.
How can I add PN-sequence as a matrix or a vector with specific size?

Save plot to a matrix in Octave/MatLab [duplicate]

This question already has answers here:
Save a plot in Matlab as a matrix [duplicate]
(2 answers)
Closed 6 years ago.
I wish to save a plot created in octave in a matrix
x=[0:10];
y=[0:10];
figure(1);
plot(x,y);
How can I save this plot into a matrix (or a 3D array, assuming it is RGB). To explain in a different way. Lets say there exist an image "img.jpg" in the working directory. Than i can open it as a matrix
A=imread("img.jpg");
How can one accomplish the same, having the plot saved in the matrix A?
Did you mean loading an image stored as a matrix into a variable? If so, You can use
A = load('img.mat')

Histogram normalise figure output [duplicate]

This question already has an answer here:
Centering histogram bins and setting percentage range in Matlab
(1 answer)
Closed 9 years ago.
I have a big matrix with thousands of values. I want to make a histogram of each signal. This is easily done with MALTAB's commands. My problem is I want it normalised in the sense that the y-axis is 0-1 and not 0-(the number of measurements). Any smart way to do this?
Use histc()
counts = histc(data);
normCounts = counts/sum(counts);