Answered
Why subplots doesn't work?
subplot(2,2,1) plot(a) subplot(2,2,2) plot(b) subplot(2,2,3) plot(a2) subplot(2,2,4) plot(b2) Note that figure will open...

6 years ago | 0

Answered
How to load multiple .mat files into two different groups
USe this file exchange: https://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort First nine will ...

6 years ago | 0

Answered
Error with surf function
[m,n] = size(data) ; x = 1:n ; y = 1:m ; surf(x,y,data) Also you can straight away use: surf(data) ;

6 years ago | 1

| accepted

Answered
Plotting after a for loop
x = -5:5 ; y = zeros(size(x)) ; y(x>=0.5) = 0.5 ; plot(x,y)

6 years ago | 0

Answered
how to put only one element randomly in row of matrix
A = zeros(4,3) ; [m,n] = size(A) ; for i = 1:m idx = randperm(n,1) ; A(i,idx) = 1 ; end

6 years ago | 0

| accepted

Answered
How can you clear the content of a workspace in the MATLAB environnement
There are multiple errors possible in MATLAB. Refer here: https://en.wikibooks.org/wiki/MATLAB_Programming/Error_Messages

6 years ago | 0

Answered
I want to divide color image in small tiles and then need to count number of color pixels in each tile.
Refer this to split the matrix/ image into blocks https://www.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix...

6 years ago | 0

Answered
hi i want to save images
for i = 1:44 h=figure ; plot(rand(1,10)) ; saveas(h,sprintf('FIG%d.png',i)); % will create FIG1, FIG2,... end

6 years ago | 0

| accepted

Answered
How can I create a small cell 500*500 pixel in one satellite image?
Refer this....it should help you: https://www.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix-i-want-to-take-m...

6 years ago | 1

| accepted

Answered
How to use matlab to calculate this sum?
With loop N = 1000 ; thesum = 0 ; for i = 1:N thesum = thesum +(1/i+1/((i+2)*(i+3))) ; end Without loop N = 1000 ; ...

6 years ago | 0

Answered
how to specify the particular column numbers of a matrix in for loop
for i = 1:1801 for j = 70:75

6 years ago | 0

| accepted

Answered
How do I call to function from other function?
You need to save both the function files in the same folder and yes call the other function in the required function. It is very...

6 years ago | 1

| accepted

Answered
How to set different marker for some different values?
fmt = {'*','o','^','.','+','x','s','p','h'}; % different markers x = 1:9 ; y = rand(size(x)) ; figure hold on for i = 1:...

6 years ago | 0

| accepted

Answered
Sum the values of one column based on another column in Table
Let T be your table. R = T.Range ; val = 862.33 ; count = nnz(abs(R-val)<=10^-5)

6 years ago | 0

Answered
Recover matrix Z from XZX', Z es symmetric and n-by-n, while X is k-by-n where n>>k
Does this match your criteria? k = 8 ; n = 5 ; % create dummy data X = rand(n,k) ; Z = rand(n) ; Z = Z+Z' ; % make ...

6 years ago | 0

Answered
How to find the power of a matrix?
A=A/10^5 ; A = A.^2 ;

6 years ago | 0

Answered
How to find convolution of three functions.
Read about conv2. s1 = conv2(conv2(f1,f2),f3) s2 = conv2(conv2(f2,f3),f1) s3 = conv2(conv2(f1,f3),f2) All the abve three a...

6 years ago | 0

| accepted

Answered
Error using sym/subsindex
Initialize the cell first. Q =cell(length(a),length(ttt)) ; % initialize USe this in the loop. Q{i,j} = %% your formul...

6 years ago | 0

Answered
How to cut area or some part of image ?
How about using this? https://www.mathworks.com/help/images/ref/imfreehand.html

6 years ago | 0

Answered
How to avoid patch color being included in legend ?
clc; clear all; close all; x = linspace(-10,10,200); y = sin(4*x); y1 = sin(x); figure; hold on patch([2 5 5 2], [[1 1]...

6 years ago | 1

Answered
Change resolution of .xyz file in matlab
You need to interpolate your data. Read about interp2. Also if you have Z data, you can use imresize. Read about this as well....

6 years ago | 0

Answered
Create stl. file with [F,V,N] data
USe this: https://www.mathworks.com/help/matlab/ref/stlwrite.html#d120e1182467

6 years ago | 0

Answered
Index exceeds the number of arrays
Try to clear the variables, before using your code. There is no error in your code. It should work. clc; clear all; A = 4; W...

6 years ago | 2

| accepted

Answered
Adding Number using for loop
Let A be your n*2 array. t = A(:,1) ; s = A(:,2) ; [C,ia,ib] = unique(t) ; N = length(C) ; iwant = zeros(N,1) ; for ...

6 years ago | 0

Answered
peak Value of a spike in graph at a particular time
You reshape your array and use min and max. Read about reshape, min, max.

6 years ago | 0

Answered
dynamic allocation of arrays
You can initiate it to a cell. resultPolygon = cell(720,1); for i = 1:720 newShaper = homogeneousTransformMatrix(phi(i))...

6 years ago | 0

| accepted

Answered
How can I save multiple matrix and index them?
txtFiles = dir("*.txt") ; N = length(txtFiles) ; themax = zeros(N,1) ; % loop for each file for i = 1:N data = import...

6 years ago | 0

| accepted

Answered
Crop out a section of the image in imshow, how?
Read about imcrop. Let I be your image. rect = [234 355 (1678-234) (764-355)] iwant = imcrop(I,rect) imshow(iwant)

6 years ago | 0

| accepted

Answered
Plot multiples time series
Let A be your 365*40 data. Multiple options. plot(A) The above options plots 40 curves in one graph. It will be confusing. ...

6 years ago | 0

Answered
Removing Missing Data from Corresponding Matrix
POCtotal(index,:)=[];

6 years ago | 0

| accepted

Load more