Answered
How do I simplify a function?
You apparently defined some of those variables as arrays previously. To use the simplified function numerically, use the matl...

3 years ago | 0

Answered
How to covert rownames to the first variable in the table?
Try something like this — T1 = array2table(randi(9, 5, 5)); T1.Properties.RowNames = {'1','2','3','4','5'} ...

3 years ago | 0

| accepted

Answered
Ideal way to smoothe gyroscope data
The LPF approach is likely appropriate, and an IIR filter (elliptical is most efficient) is likely the best option. First, de...

3 years ago | 0

| accepted

Answered
How to remove the value using Histogram
I have only a vague idea of what you want to do, especially since the .mat file does not appear to contain the same data as depi...

3 years ago | 0

Answered
what is the correct way to write this expression in matlab?
If ‘R’, ‘L’, and ‘C’ are all arrays of the same size, use element-wise operations in every multiplication, division, and exponen...

3 years ago | 1

Answered
I'm really not good at this. "Array indices must be positive integers or logical values." What is wrong?
I suspect you want to define ‘u’ as a unit step function. This does that (and solves the ‘u’ error) however it gives a likely u...

3 years ago | 0

| accepted

Answered
How do I add rows to a table in a for loop?
The vertcat function needs to know what ‘NewRow’ is to be concatenated to. Try something like this — T1 = array2table(magic...

3 years ago | 1

Answered
MATLAB error using fzero function
I have no idea what intersections you want to find, so this is a guess. It should at least get you started — % clear all; c...

3 years ago | 1

| accepted

Answered
How can you shift the position of x axis labels?
They’re probably text objects, however it’s not possible to access their properties. The only way to change them is to get them...

3 years ago | 0

| accepted

Answered
Unable to set the scatter3 marker color using clim
Perhaps something like this — scatter3(x, y, z, 50, z, 'filled', 'MarkerEdgeColor', 'none'); The fourth argument to scatter3 ...

3 years ago | 0

| accepted

Answered
How do I remove the tick marks on a bar plot at the top and the right?
Turn the Box property 'off', then use xline and yline to draw the lines — figure bar(rand(1,10)) Ax = gca; Ax.Box = 'off'...

3 years ago | 0

| accepted

Answered
PPG and Remote PPG peak detection
I went back to have another look at this. The two signals appear to have very little in common, even with respect to their Fo...

3 years ago | 0

Answered
latex in text doesn't work
Use two backslants (\\) in any sprintf call to ‘escape’ it — text(1, 1.5,sprintf('$\\tilde{y_x}$= %.3f',5), ... 'Interpre...

3 years ago | 0

| accepted

Answered
How to avoid determining P wave in PVC beat ?
There is no true P-deflection preceding a PVC. That is essentially the definition of a Premature Ventricular Contraction or P...

3 years ago | 0

| accepted

Answered
Error with plotting function
You will need to use element-wise operators with vector arguments. See Array vs. Matrix Operations for details. Use surf for...

3 years ago | 1

| accepted

Answered
Peak to peak amplitude
LD = load(websave('question_sample','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1270450/question_sample.ma...

3 years ago | 1

| accepted

Answered
Having data on yearly basis but want to have it on monthly basis
This is not the correct approach. Interpolating yearly data to monthly data creates data where none previously existed. Once t...

3 years ago | 0

Answered
How to sample from a distribution?
‘How do you use randsample (or maybe something else?) to sample from a distribution?‘ The random function can be used with kno...

3 years ago | 0

| accepted

Answered
How to perform linear regression between respective columns of two matrix/table?
One approach — A1 = randn(5,10) % Y-Values A2 = randn(5,10) ...

3 years ago | 1

| accepted

Answered
errors on function vs time plot
The exponential function in MATLAB (and every other programming language I have encountered) is exp. Try something like this ...

3 years ago | 0

Answered
i want to the fft for this bp but i have this error Error using fft Invalid data type. First argument must be double, single, int8, uint8, int16, uint16, int32, uint32, or log
Assuming that ‘bp’ does not contain any symbolic variables, perhaps this — FTbp = fft(double(bp)); This also assigns it to a ...

3 years ago | 0

| accepted

Answered
How to play sound file (mp3,wave) other than built in sound files (gong, train,..) in app designer?
See if the audioread and audioplayer functions will do what you want.

3 years ago | 0

| accepted

Answered
Finding the index in the table with the incomplete input
‘Are there anyway to find the index with the incomplete input?’ Yes. However defining the threshold for the find argument may ...

3 years ago | 0

| accepted

Answered
Calculate number appearance within a range
The histcounts and histogram functions are perfect for this — LD = load(websave('TT','https://www.mathworks.com/matlabcentral/...

3 years ago | 0

| accepted

Answered
Add date to a time data. Time data is from 7am to 7am.
It would help to have your Excel file, since I do not know if the time data are a duration array. Try something like this — ...

3 years ago | 0

| accepted

Answered
Trying to extract data trail by trail, but my data is sampled at different sampling rate.
I would downsample the EMG signal using the resample function to do the comparisons. Retain the original signal of course, si...

3 years ago | 0

Answered
Matlab running a script I executed first no matter which script I try to run
Check to see if you have a copy of it somewhere. MATLAB may be running the copy and ignoring the version you want to run, or it...

3 years ago | 1

Answered
yline error for Matlab example
First, you could have ‘overshadowed’ the line function somehow. To determine that, run this from a script or your Command Wind...

3 years ago | 0

| accepted

Answered
Convert string array to numetric.
Try something like this — sv = ["01" "01" "10" "10" "01"];...

3 years ago | 0

Answered
How to assign the result of a row deletion operation to a new matrix?
I would do something like this — A = magic(10) % Save Original C = A; ...

3 years ago | 0

| accepted

Load more