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 days 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 days ago | 0

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

7 days ago | 0

| accepted

Answered
Draw the trail of a moving marker on an animated 2D plot
A = rand(1800,1); B = rand(1800,1); % I'm just using dummy values here but my actual program has similar outputs (1800 x 1 dou...

7 days ago | 1

| accepted

Answered
Adding zeros to matrix
Let A be your 100*100 matrix. B = zeros(300) ; B(1:100,1:100) = A ;

7 days ago | 1

Answered
Obtain the mean angle (circle mean of a file)
num = xlsread(myfile) ; % better use readtable iwant = mean(num,2) ;

7 days ago | 0

Answered
How do I turn of thr grid of a surface but keep the edge line on?
[X,Y] = meshgrid(1:10) ; Z = sqrt(X.^2+Y.^2) ; % plot the outer line X1 = X ; X1(2:end-1,2:end-1) = NaN ; Y1 = Y ; Y1(...

8 days ago | 0

| accepted

Answered
Just want to learn how to better
Read about imread, imshow, title.

8 days ago | 0

Answered
How do I subplot multiple tiles that I divided from a satellite image in one figure?
count = 0 ; for m=1:16 for n=1:16 count = count+1 ; subplot(16,16,count); imshow(tiles{m,n}); ...

8 days ago | 1

Answered
Changing the color of a 3D plot
This command: h = plot( fitresult); You specify a marker/ different color for both the functions. h = plot( fitresult,'b'); ...

8 days ago | 0

Answered
Select points inside a polygon
You can use the previous questions answer..with a slight change while saving the points. clc; clear all ; load("polygon1_x.ma...

8 days ago | 1

Answered
Velocity potential with quiver command
You should use gradient. [u,v] = gradient(StreamFunction) ; quiver(x,y,u,v)

8 days ago | 0

Answered
Plot a box around set of points
This question can be solved from your previous question which was answered. If (x,y) is your point and you want points around ...

8 days ago | 2

| accepted

Answered
how can i plot positive magnitude only of a sine wave
% get the index of only positive values idx = DC_Voltage>=0 ; plot(DC_Voltage(idx))

8 days ago | 1

| accepted

Answered
i was writing a equation but this always have an error and i cant run it
You should first define the constants and then type the formula. T= 1000; L=10; W=100; S=100000; %% this is tha value of ...

8 days ago | 1

| accepted

Answered
Create a box around points and use in inpolygon
load("polygon1_x.mat") ; load("polygon1_y.mat") ; load("lon.mat") ; load("lat.mat") ; % remove Nan's from the data xv ...

8 days ago | 1

| accepted

Answered
How to use ginput to determine the coordinates of an image
You have dimensions of each image...say dimensions of each image [m,n,3]. Initiate a matrix idx such that, each quarter has the ...

9 days ago | 0

| accepted

Answered
how can i write the code out for this 1-1/2+1/3-1/4+1/5-,.....
It is your Home work..you have to do it. Do the following. Read about for loop. Fix the value of n, to run a loop. You can...

10 days ago | 0

Answered
How to find the exact index(row, col) of a maximum value in a matrix?
Let I be your image. [m,n,p] = size(I) ; x = 1:n ; y = 1:m ; [X,Y] = meshgrid(x,y) ; [val,idx] = max(I(:)) ; imshow(I...

11 days ago | 0

| accepted

Answered
strength of materials in matlab
P = [0 0] ; L = 1000 ; % length of beam B = 0.5 ; % breadth of beam B = [P ; L P(2) ; L B ; P(1) B] ; patch(B(:...

11 days ago | 0

Answered
How to make a contour plot with data from using ode45
X= linspace(1,5,5); % Vector for alpha_p values Y= linspace(0.5,3,5); % Vector for beta_p values [A, B]= meshgrid(X,Y); nt ...

11 days ago | 0

Answered
Find the general solution of the equation y ′ − y = y 2 e x .
syms y(x) ode = diff(y,x)-y==y^2*exp(x) ; sol = dsolve(ode)

13 days ago | 0

Answered
Let A and B be square matrices of same order. Prove that characteristic polynomials of AB and BA are same. Do AB and BA have same minimal polynomial ?
Calculate the eigenvalues of the product. They will be euqal. A = rand(2) ; B = rand(2) ; AB = eig(A*B) BA = eig(B*A)

13 days ago | 0

Answered
if(0.41 == (41*0.01)) is False and if(0.42 == (42*0.01)) is True .. Why?
Read about comparing floating-point numbers. tol = 10^-5 ; if(abs(0.41-(41*0.01)<=tol)) %First Condition disp('tr...

13 days ago | 0

| accepted

Answered
Error: Brace indexing is not supported for variables of this type.
datevec = cell2mat(datenum); Or check class(datenum) It should be already a converted to double.

13 days ago | 0

| accepted

Answered
Sum of two numbers is not accepted
Read about comparing two floating-point numbers. a=0.14+0.001; tol = 10^-5 ; idx = abs(M(:,2)-a)<=tol ; M(idx,:)=[];

13 days ago | 0

| accepted

Answered
How to remove the grid from plot
x = linspace(0,10); [X,Y] = meshgrid(x,x); z = X.*Y; pcolor(x,x,z); shading interp

13 days ago | 1

| accepted

Answered
Matrix dimensions must agree error
Ws=2*pi*60; tetha=0; t=0:0.0001:0.1; v1=linspace(1,30,length(t)); % it can be v1=1:1:30 N=45; I=10; p=2; K =(2*N*I)/(pi*...

13 days ago | 0

| accepted

Answered
How can I plot a unit vector in 3-D space?
You need not to use that complex, time consuming loop to get what you want. clear all close all clc N=101; x=linspace(-10,...

13 days ago | 0

| accepted

Answered
Index exceeds array bounds
x=[1:11] x(11)

13 days ago | 0

| accepted

Load more