Answered
How can I create a table to work with, from this .txt?
This works for me in *|R2017b|*: a = readtable('prueba.txt', 'Format', '%{dd/MM/yyyy HH:mm}D %f %f', 'HeaderLines',1); ...

9 years ago | 0

Answered
Array issue in numerical integration
This runs: k=1.38e-23; %Boltzmann constant% n=2.11e29; %Number density of atoms% v=6134.8; %Speed of sound in YTaO4%...

9 years ago | 0

Answered
Calculating SEF (spectral edge frequency) of a EEG
I would use *|cumtrapz|* to do the integration, and *|interp1|* using the *|cumtrapz|* result and the frequency vector to find t...

9 years ago | 1

| accepted

Answered
Export number with fewer decimals and a number in parentheses
See if the more recent versions of the <https://www.mathworks.com/help/matlab/ref/round.html *|round|*> (link) function (that al...

9 years ago | 0

Answered
Plotting dirac delta function's spectrum
The Fourier (and Laplace) transforms of the Dirac delta function are uniformly *|1|* for all omega (or ‘s’). That is the re...

9 years ago | 1

| accepted

Answered
Steady state data filtering
If you have *|R2016a|* or later, the Signal processing Toolbox <https://www.mathworks.com/help/signal/ref/findchangepts.html *|f...

9 years ago | 0

| accepted

Answered
Sum e columns together without a for loop.
I’m not certain how well this will generalise, but it works with your current problem: b = [1 2 3 4 5 6 7 8 9; 1 2 3 4 5 6...

9 years ago | 0

| accepted

Answered
Why wont Matlab plot these two arrays?
The *|plot|* call in the loop is most likely plotting one point at a time, but since you have not specified a marker for the poi...

9 years ago | 0

| accepted

Answered
ECG signal artifact removing .
Try this: Fs = 1000; % Sampling Frequency (Hz) Fn = Fs/2; ...

9 years ago | 2

| accepted

Answered
How to define a function?
Take the derivative as a symbolic object, not a function handle: syms y(t) Dy = diff(y,t); D2y = diff(y,t,t); DE = D...

9 years ago | 1

| accepted

Answered
Combine a waveform from a set of sine waves which are linearly increasing in frequency
Try this: t = 0 : 0.01 : 1; for f = 1:1:200 % Upto 200 Hz y(f,:) = sin (2 * pi .* f .* t); end plot (t...

9 years ago | 0

| accepted

Answered
How to Normalize 3D array with negative and positive values to values between -1 and 1?
One approach: A = randn(4, 4, 2) % Create Data Amax = max(A(:)); Amin = min(A(:)); R...

9 years ago | 1

| accepted

Answered
Plot with error bars to show upper and lower bounds
The *|errorbar|* error bar limits can be anything you want them to be. They are not restricted to be standard deviations or any...

9 years ago | 1

| accepted

Answered
how to plot a 3d surface with a matrix
Try this: v = linspace(-2*pi, 2*pi, 201); % Create Data [X,Y] = meshgrid(v); ...

9 years ago | 0

| accepted

Answered
Undefined operator '+' for input arguments of type 'function_handle'.
I cannot reproduce that error with the code you posted (assuming *|‘kh_1’|*, *|‘hrootzone’|*, and *|‘hgwt’|* are double-precisio...

9 years ago | 0

Answered
Help with this Matrix summation?
The second argument to *|sum|* is the dimension to sum across. *_Example_ —* Y = [5 6 7; 17 18 19]; col_sum = sum(...

9 years ago | 0

| accepted

Answered
Unexpected MATBLAB expression for ode45
You have an unmatched (and probably unnecessary) parenthesis in your initial conditions vector. See if: *|[internal Ca 0 0 0 0]...

9 years ago | 0

Answered
FFT application to Gravity data. Issues with units.
They are the same as the original units, unless you express them as power, since that squares the magnitudes. You need to divid...

9 years ago | 1

| accepted

Answered
equation and its derivative, wrong with using * please help
You need to vectorise the multiplications (replace |‘*’| with |‘.*’|) as well as the exponentiations: t = 0:8; Posi...

9 years ago | 0

Answered
Solving a nonlinear equation with time-varying parameters
Since you are solving for a single parameter, the *|fzero|* function is an option, and in this simulation, faster: v = mat...

9 years ago | 0

| accepted

Answered
95% confidence intervalsof regression line!
I like *|regress|*, even with its limitations. However, it would probably be best for you to re-run your regression with the <h...

9 years ago | 0

| accepted

Answered
How would I modify elements of a random vector based purely on value
Meet the <https://www.mathworks.com/help/matlab/ref/find.html *|find|*> (link) function!

9 years ago | 1

| accepted

Answered
Numerical solution of differential equations with MuPAD uses too much RAM
Is there a particular reason for you not to use one of the MATLAB numeric solvers, such as *|ode45|*? You can use the Symbo...

9 years ago | 1

| accepted

Answered
round of a number 35,183
That depends on how you want to round it: x = 35.183; R0 = round(x) % Round To An Integer...

9 years ago | 0

Answered
vertical line in plot
You did not post your complete code. The *|bode|* function generally allows you to make only a small number of modification...

9 years ago | 0

Answered
using mat2cell
This works: M = randn(2010, 1300); C = mat2cell(M, 201*ones(1,10), 1300); See the documentation for an explanation. ...

9 years ago | 1

| accepted

Answered
In the fft example on MATLAB help, why do we multiply by 2?
The <https://en.wikipedia.org/wiki/Fourier_transform *Fourier transform*> (link) by definition is _two-sided_, symmetrical about...

9 years ago | 2

| accepted

Answered
Undefined operator '*' for input arguments of type 'cell'
You are using curly brackets *|‘{}’|* here and in later assignments: e=0.61078*exp(17.269*{T1}/(237.3+{T1})); They defi...

9 years ago | 2

Answered
How do I made a 3 point symmetric moving average filter for given ECG data?
See the documentation on <https://www.mathworks.com/help/matlab/ref/filter.html?s_tid=doc_ta#bt_vs4t-2_1 *Moving-Average Filter*...

9 years ago | 0

Load more