Answered
descriptive statistics in one line of code
A = rand(1,10) ; v = [min(A), max(A), mean(A), std(A)] ; v(1) % min v(2) % max v(3) % mean v(4) % std

5 years ago | 1

| accepted

Answered
FileExchange stl-file to m-file?
You have to download that file from the file exchange and use. This is the link: https://in.mathworks.com/matlabcentral/fileexch...

5 years ago | 0

Answered
What is the meaning of imV = [R(:),G(:),B(:)]; ?
If A is an matrix A(:), this means it will convert the matrix A into column array by joining all columns. So, in your case the...

5 years ago | 0

Answered
why are my surfaces not connected?
You have to merge them. As of now they are two independent surfaces. Do the below: X = [z1 z4] ; Y = [z2 z5] ; Z = [z3 z6] ; ...

5 years ago | 0

| accepted

Answered
How to calculate the distance geometry between two vectors of 6 elements?
V1 = [0.0084 0.1871 0.1033 0.3332 0.3156 0.0524]; V2 = [0.0176 0.2079 0.1245 0.2954 0.2510 0.10...

5 years ago | 0

Answered
Ploting graph of date/time vs variable
Convert your dates into the class datetime.. read about datetime. And then you can striaght away use plot. https://in.mathwork...

5 years ago | 0

Answered
How do i script to calculate the Sum for the following expression
You can also achieve the same without suing loop. This is called vectorization. You should read about element by element divison...

5 years ago | 1

Answered
Total number of zeros , ones , twos..etc in a matrix
Let a be your data array. [count_unique, unique_a] = hist(a,unique(a)) ;

5 years ago | 0

| accepted

Answered
Output argument 'ua' is not assigned on some execution paths.
When the condition is not satisfied either of the variable ua, ub is not defined; so you will get error. You must define them fi...

5 years ago | 0

| accepted

Answered
finding point on a function
Read about interp1. Let (x,y) be your data. xi = a ; yi = interp1(x,y,xi) ; [xi yi]

5 years ago | 0

Answered
how do I plot different polyfit(x,y,5) onto the same graph?
Use hold on. Or save them into a matrix and plot. Read about plot, hold on.

5 years ago | 0

Answered
How can I create a set from elements and combined elements?
You can initialize a cell and get what you want. combination = cell(10,1) ; for i = 1:10 combination{i} = ['combination...

5 years ago | 0

Answered
conditional for loop not running
% case 1 idx = Y<=90*L2_v/100 ; t90 = X(idx) ; % case 2 idx = Y<=50*L2_v/100 ; t50 = X(idx) ; % case 3 idx = Y<=10...

5 years ago | 0

| accepted

Answered
Not enough Input Arguments
Did you enter all your input variables? Don't run the function files using run button or F5 key. You need to define the input va...

5 years ago | 0

Answered
plotting topography by using etopo
Read the etopo data and then you can plot them using pcolor, contour. Read about them.

5 years ago | 0

| accepted

Answered
Generate a vector of maximum values from an array of .mat files
% Read all mat files matFiles = dir("*.mat") ; N = length(matFiles) ; for i = 1:N load(matFiles(i).name) ; % Do w...

5 years ago | 0

Answered
Error: the surface Z must contain more than one row or column.
h = 0.5:.1:5.0; b = 0.5:.1:5.0; [h,b] = meshgrid(h,b); Iy = (b.^3.*h)/6; meshc(h,b,Iy)

5 years ago | 0

Answered
How can I mark specific indexes on a plot?
If (x,y) is your data and id1 and id2 are the indices. Use: plot(x,y,'b') hold on id = [id1 id2] ; plot(x(id),y(id),'*r')

5 years ago | 0

Answered
Save Fig In png. format
Read about saveas https://in.mathworks.com/help/matlab/ref/saveas.html

5 years ago | 0

Answered
What is exactly the kmeans ++ algorithm? How do I write in code?
Read about the inbuilt function kmeans. Read the references given in there. You may look in fileexchange to get different impl...

5 years ago | 0

Answered
How to categorize data in a matrix?
A = [1 0 542 1 5 21 1 10 125 1 15 6245 1 20 2678 1 50 580 1 55 1205 1 60 196 2 0 5129 2 5 34 2 10 248 2 15 348 2 20 ...

5 years ago | 1

Answered
How to smooth or average values of z in x-by-y defined areas in a XYZ array?
It is very much possible. Have a look on the following functions: movmean: https://in.mathworks.com/help/matlab/ref/movmean.ht...

5 years ago | 1

Answered
How can i divide a 64*64 grayscale image into 8*8 blocks?
Refer: https://in.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix-i-want-to-take-mean-of-each-4-4-so-that-the-m...

5 years ago | 0

Answered
plotting using for loop
You need not to use a loop to get what you want. Already you are using .* i.e. eleemnt by element operation so , you can proceed...

6 years ago | 0

Answered
How to plot summation equation
You need to proceed like below: n = 1000 ; % you can change it if you want % define your constant values below k = 1 ; ...

6 years ago | 0

Answered
As shown in the picture,how to fit discrete points to a closed curve?
Your points are no tin an order....first make them into an order using boundary. load data1.mat ; x = data1(:,1) ; y = data1...

6 years ago | 0

| accepted

Answered
Plotting 3 outputs on the same graph
Run a loop and save it into a matrix and plot at the end. %% Part 7 clc; clear; close; Ur_M=53; m1=Ur_M/12.33; m2=Ur_M/12.33...

6 years ago | 1

| accepted

Answered
How to plot a surf-plot without data extrapoation?
You have the black line in hand.. make a closed polygon out of it and get the indices of the points lying inside and outside usi...

6 years ago | 0

| accepted

Answered
how to i check if matrix cotaining logical 1
A = [1 0 0]; B = logical(A) ; if any(B); disp('super') else disp('not good') end

6 years ago | 0

| accepted

Answered
Matrix dimensions must agree spread spectrum code
The error is simple...you need to check the dimensions of your variables spreaded_sig and carrier. To use element by element mul...

6 years ago | 0

Load more