Answered
How to Calculate The Full Wave Half Maximum.
Let (n.counts) be your data. [max_counts,idx] = max(counts) ; half_max_counts = max_counts/2 ; idx = knnsearch(counts,half...

5 years ago | 0

| accepted

Answered
Plot3 interpolation 3D plot
If NaN's are present, it will effetct the interpolation. Fill the NaN's using fillmissing.

5 years ago | 0

Answered
convert hours to days on y-axis
A = [1 0 2 0 3 0 4 0.199999999999996 5 0 6 0 7 0 8 0.199999999999996 9 0 10 0 11 0 12 0]; t0 = datetime('10/10/201...

5 years ago | 1

Answered
How to find area with trapezoidal method on matlab?
Read about the function trapz.

5 years ago | 0

Answered
Creating a grid from a 2D scatter plot of vectors
Let x, y, xvel, yvel be your data. m = 100 ; n = 100; x = linspace(min(x),max(x),m) ; y = linspace(min(y),max(y),n) ; [X,...

5 years ago | 1

| accepted

Answered
help with slope field in matlab
Create x, y vectors using linspace Creat X, Y matrices using meshgrid with x, y vectors as input. Substitute X, Y in your for...

5 years ago | 0

Answered
Mapping a matrix to another matrix
A=[3;7;8;9;2;10]; B=[4,6;1,2;3,5]; C = A(B)

5 years ago | 0

| accepted

Answered
Relationship between (i & j) of a nested for loop and (x & y) coordinates?
It moves from bottom to top and left to right. Check with below: nx = 10 ; ny = 10 ; figure hold on for i = 1:nx for j...

5 years ago | 0

| accepted

Answered
Plotting contours in matlab
You have to increase the number of points while using linspace. Now defualt it is 100. n = 500 ; % change this value xv = li...

5 years ago | 0

Answered
Unrecognized function or variable 'row'.
row = 0 ; for angle =0:pi/10:2* pi row = row +1; degrees (row, 1) = angle*180/pi; sineAngle( row, 1 ) = sin (a...

5 years ago | 1

Answered
Can i get the coordinate of pixels(x,y) from superpixel labels in image??how??
Yes, you can get...use the function find. Read about the function find.

5 years ago | 0

| accepted

Answered
Vectorise matrix element multiplication
If Z is a matrix. You can replace the loop: for c = 1:q h = h*Z{combo_matrix(rand_index,c)}; end with c = 1:q ; ...

5 years ago | 0

Answered
'syms' requires Symbolic Math Toolbox. Error in Solve_ergodic_ctmc (line 1) syms p1 p2 p3 p4 p5 p6 I am using trial version Help?
You need to have symbolic toolbox downloaded. Check which syms This should show the toolbox. I am not sure symbolic tool box...

5 years ago | 0

Answered
Create a row vector named x that starts at 1, ends at 5, and each element is separated by 0.5.
iwant = 1:0.5:5 ; Read the documentation please.

5 years ago | 0

Answered
help me get the the Coefficient of Determination
Read about fitlm. https://in.mathworks.com/help/stats/coefficient-of-determination-r-squared.html

5 years ago | 0

Answered
Vectorise a matrix multiplication chain
Read about the function prod.

5 years ago | 0

Answered
How to Incorporate ARCGIS map in MATLAB?
Export the arcgis map into geotiff and you can read geotiff file in MATLAB using goetiffread or readgeoraster. IT can be done.

5 years ago | 0

Answered
define function to data set
x = importdata('x.txt') ; y = importdata('y.txt') ; y = log(y) ; p = polyfit(x,y,2) ; yi = polyval(p,x) ; plot(x...

5 years ago | 0

Answered
how to make a loop for condition?
G = 6 ; % number of cluster ind = cell(G,1) ; C = cell(G,1) ; for i = 1:G ind{i} = idx == i; C{i} = dataarea1(...

5 years ago | 1

| accepted

Answered
Using while loop and nested if statement develop a program to satisfy the following condition
This is your home work...you have to do it on your known. REad about mod to know whether number is even or odd. if mod(n,2)==0...

5 years ago | 0

| accepted

Answered
Trying to produce a meshgrid 3D plot using surf graphs, error using *
Read about element by element operations. x = 0:1:100; y = 0:10:1000; [X,Y]=meshgrid(x,y); Z=(X-X.*Y)./(X+X.^2+Y+X.*Y) ; ...

5 years ago | 0

Answered
Correlation between multiple columns of table
iwant = zeros(2,2,[]) ; count = 0 ; for r = 2:3 for p = 6:7 count = count+1 ; iwant(:,:,count) = corr...

5 years ago | 0

Answered
Making 3d array using 2d arrays and how to do that
files_jan = dir('S5P_OFFL_L2__CH4____2019*.*'); h = zeros(215,3245,438); for j = 1:438 temp = ncread(files_jan(j).name,...

5 years ago | 0

| accepted

Answered
Plot a function which contains a variable parameter
It is your home work....read about for loop and aray indexing in MATLAB. Given eblow a demo example. Extend this to your case. ...

5 years ago | 0

| accepted

Answered
Upload every n file to matlab
[file_list, path_n] = uigetfile('.txt', 'Multiselect', 'on'); filesSorted = natsortfiles(file_list); if iscell(filesSorted) ...

5 years ago | 0

| accepted

Answered
Need exact co-ordinate points for an irregular shape
If I is your binarized image. [y,x] = find(I) ; idx = boundary(x,y) ; x = x(idx) ; y = y(idx) ; The above gives the coor...

5 years ago | 0

| accepted

Answered
Extract runs of values from cell array
iwant = C(~cellfun('isempty',C))

5 years ago | 0

| accepted

Answered
Create a matrix out of single values if a for loop?
r = 0.5; a = 0; b = 5; n = 3 ; p=[r + (a-2*r)*rand(n,1),r + (b-2*r)*rand(n,1)]; H = zeros(1,[]) ; count = 0 ; for i = 1:...

5 years ago | 0

| accepted

Answered
How to convert arc circle plot into binary circle?
R = 1; th = linspace(0,2*pi,1000) ; x = R*cos(th) ; y = R*sin(th) ; xi = linspace(-2,2,100) ; yi = linspace(-2,2,100...

5 years ago | 0

| accepted

Answered
Why do I get a wrong answer when I use FIND function in this case?
Replace the line: inActive = find(G_dmg.Nodes.Load==-inf); with idx = isinf(G_dmg.Nodes.Load) ; inActive = find(sign(G_dmg...

5 years ago | 0

Load more