Answered
How can we make a rhombus in the middle?
Play with the points in R....you give the vertices of vertices..you will get it. fr=zeros(512,512); % Rhombus points R = ...

3 months ago | 0

| accepted

Answered
linear interpolation without meshgrid
Read this: https://in.mathworks.com/help/matlab/ref/scatteredinterpolant.html

3 months ago | 0

| accepted

Answered
How can I put two noises in an image?
How about imshow((tp+k)/2)

3 months ago | 0

| accepted

Answered
How can I place a quiver plot on top of a triangular surface (trisurf) plot?
USe 2D plot: patch('faces',tri(:,2:4),'vertices',[Xp' Yp'],'facevertexcdata',z','facecolor','interp','edgecolor','none') ; ...

3 months ago | 1

| accepted

Answered
how to get variable value in plot automatically
x = 0:10 ; figure hold on for i = 1:3 y = i*x ; plot(x,y) end legend OR x = 0:10 ; figure hold on for i =...

3 months ago | 0

Answered
How can I compare a set of variables?
x1= 1; x2= 3; x3= 4; x4= 3; x5= 3; x6= 1; x7=2; x = [x1 x2 x3 x4 x5 x6 x7] ; [c,ia,ib] = unique(x) ; iwant = cell(le...

3 months ago | 0

Answered
location of logical matrix
Read about ismember idx = round(rand(10,2)) ; vec = [1 1] ; [c,ia] = ismember(idx,vec,'rows') ; iwant = find(c) ; idx(...

3 months ago | 0

Answered
comparing two data sets and extract specific data from one of them
YOu can make your blue lines a closed polygon.......and use inpolygon to get the points lying inside and on the blue lines. Read...

3 months ago | 0

| accepted

Answered
symbolic derivative with respect to time
syms x(t) f = sin(x(t)) diff(f,t)

3 months ago | 1

| accepted

Answered
How to change non zero value into 0?
If A is your matrix. To get non-zero indices use: idx = A>0 ; To replace them to zero use: A(idx) = 0 ;

3 months ago | 0

Answered
can we use Xlswrite in symbolic variables?
syms x_1 y_1 A_sym = sym(zeros(2,2)); A_sym(1,1) = x_1; A_sym(2,1) = x_1 * y_1 ; A_sym(2,2) = y_1; sym_cell = arrayfun...

3 months ago | 1

| accepted

Answered
make the image to smallest 8*8 blocks
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-tha...

3 months ago | 0

| accepted

Answered
How to create multiple .dat files using matlab?
for i = 1:10 filename = strcat(num2str(i),'.dat') end

3 months ago | 0

Answered
How to find avergae of thresholded elements only from a matrix?
Let A be your matrix......say you want values below a threshold val. idx = A<val ; themean = mean(A(idx)) ;

3 months ago | 2

| accepted

Answered
How can I interpolate with a Matrix and a Vector to another vector?
YOu see, you cannot use Enthalpy as you have used, because it is not a valid meshgrid. Reather, you can treat the data as scatte...

3 months ago | 0

Answered
Surface plots inside loop
YOu can follow a samll demo code given here: [X,Y,Z] = peaks(100) ; surf(X,Y,Z) %% Make surface discontinuous for demo id...

3 months ago | 0

Answered
find slope sign change of emg signal
If (t,x) is your time and signal. dt = diff(t) ; dx = diff(x) ; slope = dx./dt ; slope_sign = sign(slop) ;

3 months ago | 0

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

3 months 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))) ;...

3 months ago | 0

| accepted

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

3 months 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...

3 months 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...

3 months 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...

3 months 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...

3 months ago | 0

| accepted

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

3 months 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(:,...

3 months 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...

3 months 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...

3 months 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...

3 months 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...

3 months ago | 0

Load more