Answered
How to plot different matrices in a cell with different marker styles
S = {'-*r', '-ok','-dr','-.b'} ; for i = 1:4 C{i} = rand(10,1) ; end % plot figure hold on for i = 1:4 plot(C{i},S{...

6 years ago | 0

| accepted

Answered
Value of time on Zero crossing
https://in.mathworks.com/matlabcentral/answers/267222-easy-way-of-finding-zero-crossing-of-a-function

6 years ago | 0

Answered
i want to write a code where equation is y=x*x. if y=100 what is the value of x?
z = 100 ; x = 1:20 ; y = x.^2 ; y(x==z)

6 years ago | 0

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.

6 years 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...

6 years 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...

6 years ago | 1

| accepted

Answered
Help Needed with looping commands
Just use: E = d(:,1)-c(:,2) ; You need not to use a loop.

6 years 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)]

6 years ago | 0

Answered
Resultant curve of two variables
Y = Y1+Y2 ;

6 years 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;...

6 years 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...

6 years ago | 1

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

6 years 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.

6 years 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) ; ...

6 years ago | 0

| accepted

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

6 years 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...

6 years 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.

6 years 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

6 years 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

6 years 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

6 years ago | 0

| accepted

Answered
to find z values for same x values
Read about griddata and scatteredIntepolant.

6 years 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 =...

6 years 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...

6 years 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)

6 years 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]...

6 years 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...

6 years 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_...

6 years 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...

6 years 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)) ;

6 years 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...

6 years ago | 0

| accepted

Load more