Answered
How to slice each string in a string array without using for loop
Using <https://www.mathworks.com/help/matlab/ref/datetime.html *|datetime|*> and its functions: celldata = [{'2018-12-12'}...

8 years ago | 1

Answered
How can I plot a second order non-linear ODE?
I would think plotting *|‘ySol(t)’|* would be more interesting: syms y(t) ode = .003*diff(y,t)== .003*9.8-3.048*10^...

8 years ago | 0

| accepted

Answered
why just showing two lines
The values for *|‘U6’|* and *|‘H6’|* are _scalars_. They are not functions of *|‘P6’|*. Also, you did not define *|‘N’|* i...

8 years ago | 0

| accepted

Answered
Which filter to use to remove baseline wander on ECG
Your signal is unfortunately sampled at a relatively low rate, so signal processing is difficult. Your signal also has harmonic...

8 years ago | 0

| accepted

Answered
Cannot use Installed Global Optimization Toolbox
Run these from a script or the Command Window: restoredefaultpath rehash toolboxcache If that fails, use the *Cont...

8 years ago | 0

Answered
Why getting some strange fractions? The code is simple and correct,maybe.
It _looks_ as though you are using the Symbolic Math Toolbox. To get the fractions as thier decimal equivalents, use the <h...

8 years ago | 0

Answered
Neglecting certain values taken by the contour
I am not certain what you want to do, so I included two options for you to choose from: Ro=0.00:0.005:0.3; Ri=real(((Ro...

8 years ago | 0

| accepted

Answered
How to avoid for-loop here; repmat
If you have *|R2015a|* or later, use the <https://www.mathworks.com/help/matlab/ref/repelem.html *|repelem|*> (link) function: ...

8 years ago | 0

| accepted

Answered
Remove empty rows from matrix
If *|‘M’|* is your matrix, this works: M = M(~all(M == 0, 2),:); It will remove the ‘all zero’ rows using ‘logical inde...

8 years ago | 3

| accepted

Answered
How to compare each four rows by each other?
If you have the Statistics and Machine Learning Toolbox, use the <https://www.mathworks.com/help/stats/pdist.html *|pdist|*> (li...

8 years ago | 0

| accepted

Answered
How do I read and split an audio file into four different frequency ranges?
If you have *|R2018a|* or later, use the <https://www.mathworks.com/help/signal/ref/bandpass.html *|bandpass|*> (link) function ...

8 years ago | 1

| accepted

Answered
gradient of the fit with uncertainty and R
See the section in the <https://www.mathworks.com/help/matlab/ref/polyfit.html *|polyfit|*> (link) documentation on *Output Argu...

8 years ago | 0

| accepted

Answered
how to find non integer elemets in matrix?
Try this: A = randi(9, 4); % Integer Array idx = randperm(16,5); A(idx) =...

8 years ago | 3

| accepted

Answered
How to create an array of sine waves from arrays of parameters
I would use a combination of vector multiplication of *|‘f’|* and *|‘t’|*, and *|bsxfun|* calls: N = 5; ...

8 years ago | 0

Answered
how can I do a Data selection in a range of data?
Try this: a = [212.3 1712691.538 334.8 1627901.768 432.6 1648187.433 569.2 1929968.041 473...

8 years ago | 2

| accepted

Answered
Writing a loop to calculate sums horizontally for ALL rows
One approach: n = 7; A = rand(n, 12); % Create Matrix cv = sum(A); ...

8 years ago | 0

Answered
How to create plots for special areas of an array?
This is perfect for the <https://www.mathworks.com/help/signal/ref/findchangepts.html *|findchangepts|*> (link) function, introd...

8 years ago | 2

| accepted

Answered
How to export result of the script to txt/doc file ?
Use the <https://www.mathworks.com/help/matlab/ref/fopen.html *|fopen|*> (link) command to create a file identification number. ...

8 years ago | 0

| accepted

Answered
Save variable in workspace but remove from memory?
Since *|‘Segment_Distances’|* appears to be a scalar, the easiest way would likely be to give it a second subscript: Segme...

8 years ago | 0

| accepted

Answered
¡Help! Error: A and B must be floating-point scalars (¿Alguien que responda en español?)
If you have the Statistics and Machine Learning Toolbox, use the <https://www.mathworks.com/help/stats/gamcdf.html *|gamcdf|*> (...

8 years ago | 0

Answered
Hi everyone! i need assistance. How to generate a smoothing polynomial for a non smoothed polynomial/function?
I would use the <https://www.mathworks.com/help/signal/ref/sgolayfilt.html *|sgolayfilt|*> (link) function to create a Savitzky-...

8 years ago | 0

| accepted

Answered
How can I make a piecewise function?
Try this: pcwsfcn = @(n,s) cos(n*pi/20 + s*pi/20) .* (((s+n) >= 10) & ((s+n) <= 50)); t = linspace(0, 60, 250); ...

8 years ago | 0

| accepted

Answered
Bandstop Filter for Force Signal
Here’s another option: Fs = 1E+3; Fn = Fs/2; Fnotch = 40; % Notch Frequency Ws...

8 years ago | 0

Answered
Plotting ODE solutions for a single time point
It requires that you slightly change your *|ode45|* call, then use the solution structure with the <https://www.mathworks.com/he...

8 years ago | 0

Answered
Output truncated. Text exceeds maximum line length for Command Window display. How to solve?
The only options I can think of are: f3Up = simplify(f3Up, 'Steps',20); f3Up = vpa(f3Up, 5) The first will do its be...

8 years ago | 0

| accepted

Answered
Need help! I keep getting the error "not enough input arguments" how do I fix this?
Your latest code (as you posted it in your earlier <https://www.mathworks.com/matlabcentral/answers/418285-need-help-i-keep-gett...

8 years ago | 0

Answered
how connect pc camera to matlab
The easiest way is to type: webcam in your Command Window. It will then throw an error and provide a link to the Suppo...

8 years ago | 0

| accepted

Answered
Can we use symbolic calculations in Matlab R2011a
Yes, if you have the Symbolic Math Toolbox. See the documentation page for <https://www.mathworks.com/help/releases/R2011a/...

8 years ago | 0

Answered
how to solve this equation
This does not look like a _homework_ problem. Beta=2; c1=0.73; c2=151; c3=0.58; c4=0.002; c5=2.14; c6=1...

8 years ago | 1

| accepted

Answered
LaTex in Matlab legend
This will call the LaTeX interpreter correctly: A= cos(tau) l1 = sin(tau) l2 = sin(tau + pi/8) plot(tau, A, 'Disp...

8 years ago | 2

| accepted

Load more