Answered
maximum value of matrix
[val,idx] = max(A(:)) ; A(idx,:)

2 månader ago | 0

Answered
Find datetime in a vector
Use ismember Or idx = knnsearch(datenum(t_ref),datenum(t1)) ; t_ref(idx) t1 Or dt = abs((datenum(t_ref)-datenum(t1))) ;...

2 månader ago | 0

| accepted

Answered
convert block cell to image
Let I be your 8*8 cell block .. iwant = cell2mat(I) ;

2 månader ago | 0

Answered
Moving a Polygon on a Polygon
pgon = polyshape([440 0 0 440], [0 0 5.1 5.1]); path = [1:5:100 100:-5:1] ; for i = path pgon2 = polyshape([18 0 0 18]+i...

2 månader ago | 1

| accepted

Answered
How do I solve backslash issue in this case?
Replace this line: filename = strcat(selpath,imageFolder(i).name); with: filename = fullfile(selpath,imageFolder(i).name); I...

2 månader ago | 2

| accepted

Answered
"Warning: Name is nonexistent or not a directory: " Error Message if I enter the path of a file I want to import
thepath = '' ; % copy your path here in quotations filename = '' ; % give your file name in quotations with extension the...

2 månader ago | 0

| accepted

Answered
Finding location of minimum in 3d array
It is asked multiple times..you may search in the forum. For EXample: https://in.mathworks.com/matlabcentral/answers/52341-min...

2 månader ago | 0

| accepted

Answered
Save and load matrix. Size problem
Check M1 might be a structure......try size(M1.Mat1)

2 månader ago | 1

| accepted

Answered
How to smooth a surface of 3-d geometry
Are you looking for something like this? dt = delaunayTriangulation(Xm,Ym) ; t = dt.ConnectivityList ; x = dt.Points(:,...

2 månader ago | 0

Answered
Ouputting all the permutations with repeated symbols in MATLAB
Read about perms. After this, you can try unique and get the required output. str = 'Mississippi' ; S = perms(str) ; iwa...

2 månader ago | 0

| accepted

Answered
running a code on all columns
Y = rand(1000,100) ; iwant = zeros(20,50,100) ; for i = 1:100 Y1 = Y(:,i) ; S1 = numel(Y1); % this is same alway...

2 månader ago | 0

| accepted

Answered
WHEN I DO INVERSE OF MY MATRIX IT GIVE VERY LARGE VALUE AND MULTIPLICATION OF (inv(H).*J) GIVE INCORRECT VALUE. can you resolve it
YOur H is a rank deficeint matrix...check rank(H) rank of H is 2. Also check it's determinant is zero. So you have only two i...

2 månader ago | 0

Answered
Saving animation of projectile motion
Convert your animation into .gif file: https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-ima...

2 månader ago | 0

Answered
Levelling of 3D built in stl file
Download this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/22409-stl-file-reader [t,p] = stlre...

2 månader ago | 0

Answered
could you please tell me how to plot 2 objects with different velocity
close all; clc; vA = [2.31; -0.55]; % initial velocity OF 1 vB = [2.31; -0.55]; % initial velocity OF 1 dt = 0.1; ...

2 månader ago | 0

| accepted

Answered
How to create 3D interpolated surface from separate lines in different arrays
Join all the points you have into a matrix of size n*3..i.e in the form (x,y,z). Not you have scattered data in hand. Do interpo...

2 månader ago | 0

Answered
If I have two 2-D datasets with identical dimension sizes, how can I filter data from one at certain gridpoints where the other dataset meets a certain condition?
A = randi([1 5],5,5) ; % shapes B = rand(5) ; % data [c,ia,ib]= unique(A) ; N = length(c) ; % GEt max values ...

2 månader ago | 0

| accepted

Answered
Computing the optimal split dimension of an image.
Refer here: https://in.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix-i-want-to-take-mean-of-each-4-4-so-that-...

2 månader ago | 0

Answered
Nearest neighbor distribution and spherical contact distribution
Read about knnsearch and rangesearch.

2 månader ago | 0

Answered
Use intersect function in model
[same,ia,ib] = intersect(a,b,'rows') ; a(sort(ia),:)

2 månader ago | 0

Answered
How to overcome this problem; Error using - Matrix dimensions must agree.
Two options: Reduce dimensions psi = psi(1:101,1:108) ; p = p(1:101,1:108) ; En =sqrt(((psi-p)^2)/psi^2); Do interpolat...

2 månader ago | 0

| accepted

Answered
How to solve "Subscripted assignment dimension mismatch"?
What the necessity to save those images into a bigger image? USe montage. Read about it.

2 månader ago | 0

Answered
How to plot Date on x axis and string on Y axis. Text annonation on Data points
Load data from excel to matlab using xlsread. Use this to use labels along the axes: https://in.mathworks.com/help/matlab/cre...

2 månader ago | 0

Answered
How to calculate post-pre connectivity matrices for multiple subjects
postfiles = dir('*post*.mat') ; m = length(postfiles) ; prefiles = dir('*pre*.mat') ; n = length(prefiles) ; post = zeros(51...

2 månader ago | 0

Answered
Draw a circle and measure the white pixels area inside
I = imread('image.png') ; I1 = rgb2gray(I) ; [y,x] = find(I1) ; length(x)

2 månader ago | 0

Answered
To crate a 2D lookup table with interpolation for matrix data and to crate a function of (x,y) (inputs) give the output from the matrix
Read about interp2. n = 20 ; Z = peaks(n) ; [X,Y] = meshgrid(1:n,1:n) ; [Xi,Yi] = meshgrid(1:0.1:n,1:0.1:n) ; Zi = i...

3 månader ago | 1

Answered
how I can get Px,Py and Pz value ?
%% %Given Theta_1 =45; Theta_2 =10; Theta_3 =0; Theta_4 =90; Theta_5 =0; Theta_6 =45; %known a1 = 0.35; a3 = 0.3; a4 ...

3 månader ago | 1

| accepted

Answered
How to convert a table into a structure
Read about table2struct. S = table2struct(T)

3 månader ago | 0

Answered
How can I select data in a pcolor plot by using a rectangle?
Read about interp2. Fix your (Xi,Yi) for which you want to extract the data and use interp2. Something like below: xi = lin...

3 månader ago | 0

Answered
Extracting data tips from 3-D figure
clear;clc;close all; figure(1); load('long_lati_depth.mat','long','lati','depth') contour(long,lati,depth,[-74 -75 -76 -77 -7...

3 månader ago | 0

| accepted

Load more