Answered

How to save X, Y coordinates from different cells in multiples files

Let SX and SY be your cells. iwant = [ [SX{:}] [SY{:}]] ; Also read about Cell2mat, cat.

How to save X, Y coordinates from different cells in multiples files

Let SX and SY be your cells. iwant = [ [SX{:}] [SY{:}]] ; Also read about Cell2mat, cat.

12 dagar ago | 0

Answered

Error using Polyfit: The first two inputs must have the same number of elements. The x can have multiple inputs as columns?

Your x is a m*6 array and y is a m*1..It is not allowed. That is why you got error. Run a loop and use polyfit for each column...

Error using Polyfit: The first two inputs must have the same number of elements. The x can have multiple inputs as columns?

Your x is a m*6 array and y is a m*1..It is not allowed. That is why you got error. Run a loop and use polyfit for each column...

12 dagar ago | 1

Answered

Plotting multiple 2D metrices

Two options: % If each matrix has two curves figure plot(A') hold on plot(B') % If each matrix has (x,y) coordinates fig...

Plotting multiple 2D metrices

Two options: % If each matrix has two curves figure plot(A') hold on plot(B') % If each matrix has (x,y) coordinates fig...

12 dagar ago | 1

| accepted

Answered

Help Needed with looping commands

Just use: E = d(:,1)-c(:,2) ; You need not to use a loop.

Help Needed with looping commands

Just use: E = d(:,1)-c(:,2) ; You need not to use a loop.

12 dagar ago | 0

Answered

Finding minima in data as well as values near it

Read about min. Let A be your array. [val,idx] = min(A) ; iwant = [A(idx-1) A(idx+1)]

Finding minima in data as well as values near it

Read about min. Let A be your array. [val,idx] = min(A) ; iwant = [A(idx-1) A(idx+1)]

13 dagar ago | 0

Answered

Storing output into a matrix for plotting

I expect rho is bein gused in the lines which are not shown...so repalce rho inside the loop with rho(i). N = 5000; Rmax = 50;...

Storing output into a matrix for plotting

I expect rho is bein gused in the lines which are not shown...so repalce rho inside the loop with rho(i). N = 5000; Rmax = 50;...

13 dagar ago | 1

| accepted

Answered

How to interpolate the matrix A ?

If you want to go ahead with NaN's itself...use intepr2, imresize. If you want to fill NaN's first, then use fillmissing and t...

How to interpolate the matrix A ?

If you want to go ahead with NaN's itself...use intepr2, imresize. If you want to fill NaN's first, then use fillmissing and t...

13 dagar ago | 0

| accepted

Answered

how can i call and plot function of two variables ?

Define x1 and x2 using linspace. Make x1, x2 matrices, using meshgrid. Make your caclulation. You need to use element by ele...

how can i call and plot function of two variables ?

Define x1 and x2 using linspace. Make x1, x2 matrices, using meshgrid. Make your caclulation. You need to use element by ele...

13 dagar ago | 0

| accepted

Answered

smoothing the poor image of resolution 2.5cm in range and 1 degree in azimuth and elevation

Read about interpolation. Check interp2.

smoothing the poor image of resolution 2.5cm in range and 1 degree in azimuth and elevation

Read about interpolation. Check interp2.

13 dagar ago | 0

Answered

How to plot contour with constraints

Cpe=-0.6; lamdan=0.5; lamdad=0.5952; lamda12=0.84; nd=0.9; n12=0.9; nn=0.7; si1 = linspace(0,1) ; si2 = linspace(0,1) ; ...

How to plot contour with constraints

Cpe=-0.6; lamdan=0.5; lamdad=0.5952; lamda12=0.84; nd=0.9; n12=0.9; nn=0.7; si1 = linspace(0,1) ; si2 = linspace(0,1) ; ...

13 dagar ago | 0

Answered

Cant run a function

You must define one function in a single file and save it in the name of the function. function x = rot1(p) % define your for...

Cant run a function

You must define one function in a single file and save it in the name of the function. function x = rot1(p) % define your for...

13 dagar ago | 0

| accepted

Answered

Identify polygons enclosing a point in a shapefile

To get the locations/ points lying inside the polygon use inpolygon. To get the intersection points use InterX. https://in.mat...

Identify polygons enclosing a point in a shapefile

To get the locations/ points lying inside the polygon use inpolygon. To get the intersection points use InterX. https://in.mat...

13 dagar ago | 0

| accepted

Answered

How to compare an integer to the elements of a vector?

idx = find(u<C) ; idx(1) Read about find, you should have an option of getting first index striaght away.

How to compare an integer to the elements of a vector?

idx = find(u<C) ; idx(1) Read about find, you should have an option of getting first index striaght away.

13 dagar ago | 0

Answered

I want to sketch one sheeted hyperboloid x^2-y^2+z^2=1 using meshgrid of MATLAB

https://in.mathworks.com/matlabcentral/answers/16688-how-to-draw-a-hyperboloid

I want to sketch one sheeted hyperboloid x^2-y^2+z^2=1 using meshgrid of MATLAB

https://in.mathworks.com/matlabcentral/answers/16688-how-to-draw-a-hyperboloid

13 dagar ago | 0

Answered

how to print figure in jpg without white margin

You may use this FileEXchange: https://in.mathworks.com/matlabcentral/fileexchange/23629-export_fig

how to print figure in jpg without white margin

You may use this FileEXchange: https://in.mathworks.com/matlabcentral/fileexchange/23629-export_fig

13 dagar ago | 0

| accepted

Answered

How to add three dimensional data points to MATLAB

Refer this: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns

How to add three dimensional data points to MATLAB

Refer this: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns

14 dagar ago | 0

| accepted

Answered

to find z values for same x values

Read about griddata and scatteredIntepolant.

to find z values for same x values

Read about griddata and scatteredIntepolant.

14 dagar ago | 0

Answered

Combining 2 matrices into 1

A = rand(413,1) ; B = rand(905,1) ; % Get A to size of B x = (1:length(A))' ; xi = linspace(1,length(A),length(B)) ; A =...

Combining 2 matrices into 1

A = rand(413,1) ; B = rand(905,1) ; % Get A to size of B x = (1:length(A))' ; xi = linspace(1,length(A),length(B)) ; A =...

14 dagar ago | 0

Answered

How to find corresponding peaks between two datasets using timestamps

Read about knnsearch. Provide the locations of Grey data and get the distance, nearest points to Black data. By checking the dis...

How to find corresponding peaks between two datasets using timestamps

Read about knnsearch. Provide the locations of Grey data and get the distance, nearest points to Black data. By checking the dis...

14 dagar ago | 0

Answered

I need some help creating a dice function for my homework assignment in matlab

Read about randi. d = 6 ; ant = 5 ; iwant = randi(d,5,1)

I need some help creating a dice function for my homework assignment in matlab

Read about randi. d = 6 ; ant = 5 ; iwant = randi(d,5,1)

14 dagar ago | 0

Answered

Combining 2 different sized matrices.

A = rand(3) ; B = rand(4) ; m = size(A,1) ; n = size(B,1) ; O1 = zeros(m,n) ; O2 = zeros(n,m) ; iwant = [A O1; O2 B]...

Combining 2 different sized matrices.

A = rand(3) ; B = rand(4) ; m = size(A,1) ; n = size(B,1) ; O1 = zeros(m,n) ; O2 = zeros(n,m) ; iwant = [A O1; O2 B]...

14 dagar ago | 0

| accepted

Answered

Hello,How can I extract values from a c,e and h matrices which can be incorporated into another matrix?

You might be looking for this: clear all; %Parameters %k= curvature parameter %omega= w; natural frequency...

Hello,How can I extract values from a c,e and h matrices which can be incorporated into another matrix?

You might be looking for this: clear all; %Parameters %k= curvature parameter %omega= w; natural frequency...

14 dagar ago | 0

| accepted

Answered

Separating an matrix into multiple matrices to generate audio.

load sspeech1.mat ; load quiet_row.mat ; temp = speech1(quiet_row) ; % this will get all values of speech1 for which quiet_...

Separating an matrix into multiple matrices to generate audio.

load sspeech1.mat ; load quiet_row.mat ; temp = speech1(quiet_row) ; % this will get all values of speech1 for which quiet_...

14 dagar ago | 0

Answered

How to plot 4d data?

Let A be you m*4 data. x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; c = A(:,4) ; nx = length(unique(x)) ; ny = length(unique(y...

How to plot 4d data?

Let A be you m*4 data. x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; c = A(:,4) ; nx = length(unique(x)) ; ny = length(unique(y...

14 dagar ago | 0

Answered

How do you do matrix math?

Read about exp, sqrt. If A is my matrix, to get exp of sqrt, I will use. iwant = exp(sqrt(A)) ;

How do you do matrix math?

Read about exp, sqrt. If A is my matrix, to get exp of sqrt, I will use. iwant = exp(sqrt(A)) ;

14 dagar ago | 0

Answered

remove character within a string

s1 = 'DJI GHA MOZ DJI NER NER NER GHA ' ; s2 = 'NER' ; s1 = strsplit(s1) ; idx = ismember(s1,s2) ; % get the strings pre...

remove character within a string

s1 = 'DJI GHA MOZ DJI NER NER NER GHA ' ; s2 = 'NER' ; s1 = strsplit(s1) ; idx = ismember(s1,s2) ; % get the strings pre...

14 dagar ago | 0

| accepted

Answered

least-squares-regression

Read about polyfit. If you have the data x, y you can fit a line and get p1, p2 using polyfit. p = polyfit(x,y,1) ; p1 = p(1...

least-squares-regression

Read about polyfit. If you have the data x, y you can fit a line and get p1, p2 using polyfit. p = polyfit(x,y,1) ; p1 = p(1...

15 dagar ago | 0

Answered

3D Matrix manipulation

% to create random matrix A = rand(3,3,10) ; % To create random integers with in 100 B = randi(100,3,3,10) ; % To make on...

3D Matrix manipulation

% to create random matrix A = rand(3,3,10) ; % To create random integers with in 100 B = randi(100,3,3,10) ; % To make on...

15 dagar ago | 0

| accepted

Answered

Finding a value based on multiple conditions of the next row

idx = find(DrivenTime(Procedure==2)) ; PReviousRow = idx(1)-1

Finding a value based on multiple conditions of the next row

idx = find(DrivenTime(Procedure==2)) ; PReviousRow = idx(1)-1

15 dagar ago | 0

| accepted