Answered
how to make upper and lower envelope line
Read about envelope.

6 years ago | 0

Answered
How to plot 3-D grid data in scatter plot?
I think your mat files has 3D matrices. You need to use cpcolor or surf to plot them. load PERM2.mat ; A = Node.Value ; [m,n...

6 years ago | 0

| accepted

Answered
Find equal elements in an array and average the corresponding values
Let A and B be your matrices of size 92417x3, 40318x3 respectively. First you need to get them to the same dimension to find th...

6 years ago | 0

Answered
Adding contour lines to heatmap
Read about contourf. Or use contour with hold on. You need to specify the level and your desired color.

6 years ago | 0

Answered
how can i give a third vector i don't have the same length of the first two?
M1 = [12, 45, -5] ; M2 = [24, -3, -5] ; M3 = [ 4, 15, -5] ; hold on plot3([M1(1) M2(1)],[M1(2) M2(2)],[M1(3) M2(3)],'b'...

6 years ago | 0

Answered
Velocity contour plots in a rectangular domain
Read the excel data into MATLAB using xlsread. Form a matrix and use contour. num = xlsread(myFile) ; y = num(2:end,1) ; x...

6 years ago | 0

Answered
Removing a particular column from multiple large datasets.
If A is your matrix....to remove first column. A(:,1) = [] ;

6 years ago | 0

Answered
how to arrange vectors in descending order?
A = rand(10,5) ; [m,n] = size(A) ; B = A ; for i = 1:n B(:,i) = sort(A(:,i),'descend') ; end

6 years ago | 0

Answered
Save data from for loop to a structure
Size1 = size(ca, 1); Size2 = size(ca, 2); BW = cell(Size1,Size2) ; P = cell(Size1,Size2) ; for r = 1 : Size1 for c = 1 ...

6 years ago | 0

| accepted

Answered
Assigning a variable according to file name..
You need not to change the variable as based on filename..you can initialize an array/ matrix and save the variables into this. ...

6 years ago | 0

Answered
Index exceeds the number of array elements (11)
h = 0.01; % time step dxdt = @(x,y) y; dydt = @(x,y) x-x^3; m = 100 ; x = zeros(m,1) ; y = zeros(m,1) ; x(1)=1; y(1)...

6 years ago | 0

| accepted

Answered
Plot vectors in cell array over for loop
figure hold on for k = 1:numel(sigvecarray) plot(sigvecarray{k}) end

6 years ago | 1

| accepted

Answered
structure inside a function
If you have two equal vectors, like: a = rand(1,3) ; b = rand(1,3) ; m = a.*b % this should be used. This iscalled elemen...

6 years ago | 0

Answered
how to create helix
r = 2 ; c = 10 ; th = linspace(0,2*pi*c,500) ; x = r*cos(th) ; y = r*sin(th) ; z = c*th ; plot3(x,y,z)

6 years ago | 0

Answered
Index in position 2 exceeds array bounds(must not exceed 3), why am i getting this error?
A=[15 6 3;2 11 -3;5 -2 9]; B=[16;5;8]; P=[0;0;0]; Max=100; [m,n] = size(A) ; disp('Gauss Seidal Method'); disp('x1 x2 x3')...

6 years ago | 0

| accepted

Answered
How to combine two 1D functions into 3D plot?
x = linspace(-1,1,513); y = linspace(-1,1,513); [X,Y] = meshgrid(x,y); Z0 = 625*sinc(25*X)-200*sinc(20*X).*exp(-1i*5*pi*X...

6 years ago | 0

Answered
256x256 medical image gives me 256x256x3
You can convert it into gray image using rgb2gray. I1 = rgb2gray(I) ; % where I is RGB image

6 years ago | 0

| accepted

Answered
Is it possible: plot increment with x in numerator and denominator?
Read about MATLAB element by element operations. https://in.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.htm...

6 years ago | 0

Answered
I'm trying to take the grid points x and y and the velocities Vx and Vy to plot the streamlines using streamline starting at x = −4 and 21 and y locations between -4 and 4.
clc clear all close all Vo= 10; Po = 101000; rho = 1.225; R =1; x = linspace(-4,4,1000); y = linspace(-4,4,1000); [X,Y]...

6 years ago | 0

| accepted

Answered
How can I write this animated figure as a movie?
https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab

6 years ago | 0

Answered
Find Eigenvalues without function "eig"
syms x A = [10 0 0; 1 -3 -7 ; 0 2 6] ; p = det(A-eye(3)*x) % this is the characteristic equation val = solve(p) % ...

6 years ago | 0

Answered
Help max sum path of matrix?
clc; clear all ; A = [7 4 5;8 6 9; 1 2 4 ] ; [m,n] = size(A) ; m0 = 3 ; n0 = 1 ; % Initial position m1 = 1 ; n1 = 3 ; ...

6 years ago | 0

Answered
how to draw 2D or 3D graphs with large data
Let (x,y,z) be your column data. dt = delaunayTriangulation(x,y) ; tri = dt.ConnectivityList ; figure trisurf(tri,x,y,z) s...

6 years ago | 0

| accepted

Answered
How can I plot 100 random points within a circle of diameter 2 centered at the origin and 100 random points outside of the circle?
clc; clear all ; d = 2. ; C = [0. 0.] ; R = d/2 ; th = linspace(0,2*pi) ; xc = R*cos(th) ; yc = R*sin(th) ; % Ge...

6 years ago | 0

Answered
Formula for finding point on a line given distance along a line.
P0 = rand(1,2) ; P1 = rand(1,2) ; % Normalize the line v = P1-P0 ; vunit = v/norm(v) ; % Get a point from P0 at a di...

6 years ago | 0

| accepted

Answered
Contour plot shrinking about its origin
You change the x,y limits and use the same z... a = 37; [x,y] = meshgrid(linspace(-4,4,30)); z = exp(-x.^2/15-y.^2); figure(...

6 years ago | 0

Answered
how to find T(i+1) when we have series of data .
From your formula you can write the following for T(i+1) T(i+1) = k*S*(Tb-T(i))+T(i) ; Define your k, S, Tb and intialize you...

6 years ago | 0

| accepted

Answered
how can i make a column from excel data to a matric.
tx = rand(10,1) ; ty = rand(10,1) ; tz = rand(10,1) ; C = [tx ty tz] ; m = length(tx) ; A = zeros(4,4,m) ; for i...

6 years ago | 0

Answered
How to use fprintf statements after a function
Let x be your vector. fmt = [repmat('%g, ', 1, numel(x)-1), '\n'] ; fprintf(fmt, x)

6 years ago | 0

Answered
rearrange matrix elements randomly
Read about randperm. With this you can get random indices/ numbers. Let A be your matrix. [m,n] = size(A) ; idx = randperm...

6 years ago | 1

Load more