Answered
How to find the same multiple elements in two different matrices
REad about ismember. Let A and B be your matrices. [idx,ia] = ismember(A(:,1:3),B(:,1:3),'rows') ; A(idx,:) B(idx,:)

7 years ago | 0

Answered
How do I produce a solid green image directly above an imported image
I1 = imread('peppers.png') ; [nx,ny,nz] = size(I1) ; I2 = zeros(nx,ny,nz) ; I2(:,:,2) = 255 ; I12 = vertcat(I2,I1) ;...

7 years ago | 0

| accepted

Answered
Turn off the dispaly of the values on Yaxis
set(gca,'yticklabel',[])

7 years ago | 0

| accepted

Answered
how to super impose two images in matlab
fid=fopen('FAULT_STATIONS.txt') ; s=textscan(fid,'%f %f %f %s %f') ; fclose(fid) ; y=s{2}/1000 ; z=s{3}/1000 ; plot(y, z,'...

7 years ago | 0

| accepted

Answered
How to save the data every time i run 3 For loops?
for K1 = 170000:5000:210000 for B1 = 0:10:100 for M1 = 1:0.05:1.2 sim('MSDsystem'); Disp...

7 years ago | 0

Answered
How to obtain displacements of certain points in a video by comparing each frame of the video with the successive frame?
This demo should be of help: https://in.mathworks.com/help/vision/examples/pattern-matching.html

7 years ago | 0

Answered
Display multiple figures / images into one figure / image
Read about subplot for i = 1:6 subplot(3,2,i) plot(rand(10,1)) end

7 years ago | 0

Answered
what does the dimensions in an image represent
Read about size 480 640 4 480 corresponds to number of rows. 640 corresponds to number of columns. 4 corresponds to th...

7 years ago | 0

Answered
Could anyone help me how to solve the following issue with respect to the following code
a=[ 4.7908 5.0104 5.1329 5.3186 5.3094 5.3070 5.4452 5.5001; 0.0958 0.0994 0 0 0...

7 years ago | 0

Answered
Could anyone help me to solve the following issue
a = [1 2 3 4 5; 6 7 8 9 10] ; idx1 = (randperm(length(a))) ; idx2 = setdiff(1:numel(a),idx1) ; iwant = [a(idx1) ; a(i...

7 years ago | 0

Answered
Create Heatmap with custom colorbar (i.e. <0.01, <0.05)
Read about pcolor, colorbar and colormap.

7 years ago | 0

Answered
Hi every one can you help me please
How about the below approach: Divide both the images into a grid (meshgrid, boxes of uniform length and width) In each image s...

7 years ago | 0

Answered
Assigning a 2D matrix
If you know column numbers and don;t know row number; you can initialize as below; iwant = zeros([],col) ; If you know row nu...

7 years ago | 0

| accepted

Answered
Hovmoller Diagram / Heat Map -- need help with creating plot?
Hovmoller plot is a plot which has spatial information (keeping either x or y constant and varying y or x ) along X-axes and a v...

7 years ago | 0

Answered
conversion of cell to matrixes
Read about cell2mat iwant = cell2mat(K) ;

7 years ago | 0

Answered
How do you plot the line of intersection between two planes in MATLAB
[X,Y] = meshgrid(0:0.01:5,0:0.01:5); Z = X.^2 + Y.^2; Z1 = 2 -X + Y; Z2 = (X + 3*Y -3)/2; surf(X,Y,Z1); hold on surf(X,Y,Z...

7 years ago | 2

Answered
How can I delete the elements of array on MATLAB?
global Array1 global Array2 filename = 'data.xlsx'; for i = 1:3 sheet = i for j = (1:2)-1 one = [1]; ...

7 years ago | 0

Answered
Triangulate open region of previous triangulation
Read about delaunayTriangulation. Take all the points (x,y) for each grain and make them a single column vector. Use deluanyTria...

7 years ago | 0

Answered
How can I solve if condition in for loop matrix?
all(A<B,2)

7 years ago | 0

Answered
loading multiple mat files from a directory one by one, and running a script for them
matfiles = dir('*.mat') ; N = length(matfiles) ; iwant = cell(N,1) ; % to save output for i = 1:N load(matfiles(i).n...

7 years ago | 2

Answered
How can I read all my audio files from one directory and store it as one variable matrix?
% P = 'audiofolder'; S = dir(fullfile(P,'*.wav')); N = natsortfiles({S.name}); C = cell(numel(N),1) ; ...

7 years ago | 0

Answered
Is it possible to get the area of the 'holes' found in bwboundaries?
Read about regionprops. This gives you what you want.

7 years ago | 0

Answered
Finding circles in a thresholded image
USe this: https://in.mathworks.com/matlabcentral/fileexchange/9168-detect-circles-with-various-radii-in-grayscale-image-via-houg...

7 years ago | 1

Answered
How to convert this to the filled 2-D contour plot?
load dataset.mat m = 100 ; n = 100 ; x = linspace(min(X),max(X),m) ; y = linspace(min(Y),max(Y),n) ; [Xi,Yi] = meshgr...

7 years ago | 1

| accepted

Answered
Problems with surf a 3D cylinder and a 3D curve
No syms required. x = 0:0.1:6; y = x; [X,Y] = meshgrid(x,y); f = X.^3 + Y.^3 +3.*X.*Y; g = (X-3).^2 + (Y-3).^2 - 9; %...

7 years ago | 0

Answered
find zero and nonzero elemnt in cell
A={[21],[0],[32],[4],[60],[0],[0]}; B=A; idx = cellfun(@any,A) ; B(idx) = {0.2} ; B(~idx) = {0.1} ;

7 years ago | 0

| accepted

Answered
Index exceeds array bounds. Error in ip2 (line 10) if j+1 == y(j+1)
x = [1 2 2 3 3 4 5 6 ]; % intensities y= [1 3 3 4 4 5 6 7]; % theta P = zeros(1, 10); for i= 0:1:8 for j= 0:1:4 ...

7 years ago | 0

Answered
Could anyone help me how to solve the following issue.
[randi([1,5], 1, 5) randi([1,5], 1, 5)]

7 years ago | 0

Answered
Please anyone help me with the error!
potential = double(potential) ; fprintf('the potential difference is = %f\n',potential) ; Your variable potential is in syms...

7 years ago | 0

Answered
How to fill a 3D logical matrix by a series of point coordinates?
Multiple ways: Use inpolygon, get indices, fill the logicals. Use ineqalities and get logicals straight away.

7 years ago | 0

Load more