Answered
divide data according to year, month, day
See if the findgroups (link) function (introduced in R2015b) will do what you want.

8 years ago | 0

| accepted

Answered
How can I split up several numbers in one cell from an excel file?
I am not exactly certain what you want. One option would be the mat2cell (link) function. Each column would be its own cell,...

8 years ago | 0

| accepted

Answered
How to find a slope of signal if we do not know the value of x1, x2, y1, y2
I am not certain what you intend by ‘slope of a signal’. You can easily determine the derivatives of the signal with the gradie...

8 years ago | 0

| accepted

Answered
comparing point coordination with line
One approach: y1 = @(x) -0.3*x + 4.4; y2 = @(x) 3*x - 22; pt = [10, -10]; Difference = [y1(pt(1))-pt(2); y2(pt(1))-pt(2)] ...

8 years ago | 0

| accepted

Answered
Counter not working in for loop
We cannot see the ‘code that uses the counter’. Check to see if your code is somehow clearing ‘x’ or setting ‘x’ to [].

8 years ago | 0

Answered
How could i displace the values of X axis under X axis (Y negative) ?
Use the equation (or values) for the line, and plot the numbers just as you have plotted them under the circles. If you do not ...

8 years ago | 1

| accepted

Answered
Multiple bar plots and error bars
Try this: meanA = [1.9000 5.1333 9.6167]; meanB =[2.1069 4.8297 8.8746]; meanC =[1.6632 6.1078 9.9431]; S...

8 years ago | 0

| accepted

Answered
lsqcurvefit doesn't curve fit
Use as many data as you have. Also, nonlinear parameter estimation techniques are very sensitive to the initial estimates (that...

8 years ago | 0

Answered
Returning NaN after mean or sum calculation
I cannot reproduce the problem you are seeing. My code: T = readtable('01-RHab.txt','ReadVariableNames',0); x = T.Var1; ...

8 years ago | 1

| accepted

Answered
generate n random number between two numbers follow exponential distribution
I would use the Statistics and Machine Learning Toolbox exprnd (link) function. Experiment to get the result you want.

8 years ago | 0

| accepted

Answered
generation of sound wave
Fs = 4.41E+4; t = linspace(0, Fs*5, Fs*5); f1 = 1E+3; f2 = 1E+1; s = sin(2*pi*f1*t/Fs) .* cos(2*pi*f2*t/(5*Fs)); sound(s,...

8 years ago | 0

| accepted

Answered
Numerically Solve for Upperbound on numerical Integral
Try this: v = 1; % Just an example value fun = @(x) x.^x; sval = fzero(@(s)integral(fun,0,s)-v, 1) Check = integral(fun,0...

8 years ago | 2

| accepted

Answered
How to write a cross signal function and apply it to the signals?
This looks like homework. See the documentation on the xcorr (link) function. That will either solve your problem or get you...

8 years ago | 0

Answered
Plotting a function with 2 independent variables of different ranges?
One option is to calculate ‘a’ and ‘b’ as matrices (by transposing one vector to a column, tne multiplying): theta = -pi : pi/...

8 years ago | 0

Answered
Finding inverse Laplace Transforms using Matlab
A reasonably illustrative example: syms H(s) s t H(s) = (s^2 + 3*s + 5)/(s^3 + 5*s^2 +6*s + 9); Hpf = partfrac(H) h(t) = v...

8 years ago | 3

| accepted

Answered
Mismatch in vector size within anonymous function
We don’t have ‘x_cur’ and ‘y_cur’, so I assume they are each (1 x 5) row vectors. With that addition, this code snippet: x_...

8 years ago | 0

| accepted

Answered
Fill my plot with a colour
Try this: figure plot(rand(1,10), rand(1,10), 'p') set(gca, 'Color',[1 0.92 0.8])

8 years ago | 0

| accepted

Answered
plotting multiple series on one graph from a text file
They all appear to plot together, and there is no easy way to offset them to plot them in a single plot. The best option then a...

8 years ago | 0

| accepted

Answered
Plotting a Graph from Data
Try: figure plot(L,Band_Gap) grid in your script that calculates those values instead.

8 years ago | 1

Answered
Drawing multiple (10) subplots in the same figure
The subplot function fills the subplot positions by row, so that the second subplot (subplot(5,2,2)) is the second subpot in the...

8 years ago | 0

| accepted

Answered
Multi Variable Non-linear Curve Fitting in MATLAB
I would do this: [D,S] = xlsread('Data_Source.xlsx'); EPT = D(:,1:3); tauv = D(:,4); % tau(i) = ai * (p^bi) * (T^ci) * EXP...

8 years ago | 1

| accepted

Answered
How can I perform a mathematical operations on all elements of a column of numerical data imported from Excel in Matlab?
Try this: D = xlsread('YourFile.xlsx'); D1new = D(:,1)/sqrt(3);

8 years ago | 0

| accepted

Answered
sdmag evaluation by bode instruction
Those are only calculated for identified systems. If you edit the bode.m here (to simply look through rather than edit the c...

8 years ago | 1

| accepted

Answered
Categories automatically being labelled and sorted into matrix?
I have no idea what characteristic distinguishes your ‘categories’. See if the findgroups (link) function will do what you want...

8 years ago | 0

Answered
How to display entire row
Try this: Alti = [-5000; 0; 5000; 10000; 15000; 20000; 25000; 30000; 35000; 40000; 45000; 50000; 60000; 70000; 80000; 90000; 1...

8 years ago | 0

| accepted

Answered
vector function takes vector input ?
First, gradient is a quite useful built-in MATLAB function, so name your function something different. Second, your function ...

8 years ago | 1

| accepted

Answered
I need help with Matlab
The problem is that you named your parent function and your anonymous function the same. That’s going to cause problems. Try...

8 years ago | 0

Answered
Bart chart absolute width
The bar plot widths appear to scale according to the number of bars plotted. The easiest way might simply be to cheat: if n...

8 years ago | 0

Answered
Error Using Sym/Limit
It does not appear that you have defined ‘h’, at least in the code you posted. Have you defined ‘h’ anywhere in your code?

8 years ago | 0

| accepted

Answered
arrow length problem with 'quiver' function
The quiver function has more options that what is listed in the examples of the quiver function documentation. See the docume...

8 years ago | 0

Load more