Answered
Generating an example noisy sine wave signal
Try this — fs = 16000; % sampling frequency t = 0:1/fs:0.02; % start : time step : end...

3 years ago | 0

Answered
Patch Between two curves that are not functions. Crosses over
Perhaps this — x1 = [1 1 1 2.5 5]; y1 = [5 2.5 1 1 1]; x2 = [2 2 5]; y2 = [5 2 2]; figure hold on plot(x1...

3 years ago | 1

| accepted

Answered
How do I find the overall model p-value of a multinomial regression model (mnrfit)?
According to the documentation, mnrfit is no longer recommended (as of R2023a), and recommends fitmnr instead. It appears to p...

3 years ago | 1

Answered
Checking whether excel file is opened?
The fopen function can return information about MATLAB instances of the open files, however I am not certain that it can go beyo...

3 years ago | 0

Answered
how can i resample signals using signal analyzer app
The example in Resample and Filter a Nonuniformly Sampled Signal could be helpful.

3 years ago | 1

| accepted

Answered
trying to find which row this specific date time is at in an excel sheet
The ismember function is an option — ValueAtNumRow = datetime('11-Sep-2023 22:25:26', 'InputFormat','dd-MMM-yyyy HH:mm:ss') d...

3 years ago | 1

Answered
Scatterplot arrays with different number of elements and tracing the trendline
One option is to reshape the (3x36) arrays into (i08x1) (column) vectors and duplicate ‘M_IRI’ to match by just triplicating it ...

3 years ago | 0

| accepted

Answered
Difference between bandpass function and butterwoth bandpass function
I always use the 'ImpulseResponse','iir' name-value pair when using bandpass or its friends. That forces it to design a vewry e...

3 years ago | 1

| accepted

Answered
Finding the 'peaks' of a stairway graph
It would really help to have your data (or at least a representative sample of it that demonstrates the problem you want to sol...

3 years ago | 0

| accepted

Answered
Reformat and Merge Date and Time columns
For what it’s worth — LD = load('RVdata.mat'); data = LD.data data.Date = data.Date + timeofday(data.TimeHHmmss); data = re...

3 years ago | 2

| accepted

Answered
Extract interpolated data from contourf?
The contour functions return (x,y) matrices for each contour, and in all likelihood, the ‘x’ values are not the same for both co...

3 years ago | 0

Answered
Average C/No value for each second
It would help to have the data. The best approach will likely be to create a timetable from it and then use the retime funct...

3 years ago | 0

| accepted

Answered
Use the correct filter on a signal
Frequency-selective filters do not work that way. (Intrigued by this, I attenpted to design one by taking the -transform of the...

3 years ago | 0

Answered
read file txt with strings and numbers
Use readtable or readcell, depending on what you want. There are other options (textscan), however those two are easiest to use...

3 years ago | 0

| accepted

Answered
Equation with constants and two variables that are ranges of values
Try this — Beta=(0.0:0.10:1.0); T=(473.15:100:1473.15); BigDeltaPlgH2O = (2.91-0.76*Beta) .* (10^6./T.^2) - 3.41 - 0.41*Beta...

3 years ago | 0

| accepted

Answered
how do you offset curves?
Was my answer to your previous post How to invert axes? helpful? In: subplot(2,2,2, 'align'); if you want the time vector ...

3 years ago | 1

Answered
How to invert axes?
I believe what you want is Reverse — x = linspace(0, 1); y = exp(-(x-0.5).^2*50); figure plot(x, y) grid figure plo...

3 years ago | 1

| accepted

Answered
How to remove incorrect tags from questions?
In the right margin of this page (and the page you want to change), there is a section called (appropriately) Tags. Just to the...

3 years ago | 0

Answered
How to code NESTED CYCLES
I would set the empty array to 1 (so that it iterates one time only) and be done with it — a = @(x,y) [x y]; f = [3 6 3 9];...

3 years ago | 0

| accepted

Answered
Determining Signal to Noise Ratio
Calculating SNR can be difficult if the underlying signal is unknown. An extended discussion is in the Analyzing Harmonic Disto...

3 years ago | 0

| accepted

Answered
How can I solve for specific complex solutions?
I am not certain what you want. The first step in solving this is to plot the functions. They may either guide you to a solu...

3 years ago | 0

| accepted

Answered
Dealing with transfer function in symbolic math toolbox.
Yes. Once you have the symbolic polynomials in , use the sym2poly function to extract the coefficiinets. (It may be necesary...

3 years ago | 1

| accepted

Answered
What stat test to use for improved task?
Theis seems to me to ba a paired test, so the Wilcoxon signed rank test (the signrank function) would likely be appropriate. ...

3 years ago | 0

| accepted

Answered
Fitting PDE to estimate parameters
I see one problem: residual = Ccalc - Cexp; that is easily fixed by using the norm function (here calculating the square root...

3 years ago | 0

| accepted

Answered
Averaging a curve with itself
Try this — % type('membrane_intensity.m') LD = load('test.mat'); x = LD.cx; y = LD.c(:,1,1); [xs,x1] = min(x); [xe,x2...

3 years ago | 0

| accepted

Answered
how write legend plot right side)
Try this — x = linspace(0, 10); y = randn(size(x,2), 5); figure plot(x, y) legend(compose('Vector %2d',1:5), 'Location',...

3 years ago | 1

| accepted

Answered
Replacing elements in arrays
I am not exactly certain what you want to do, what the nubmers are, or if you only want to replace one or all that meet the crit...

3 years ago | 0

Answered
Detrending still leaves a slope
This is the best I can do with your data. A reasonably robust approach is — % imshow(imread('lineprofile.jpg')) % imshow(i...

3 years ago | 0

| accepted

Answered
Fourier analysis of an spwm signal
Try this — LD = load('spwm_one_cycle.mat') ts1 = LD.ts1 Time = ts1.Time; Data = ts1.Data; figure plot(Time, Data) xl...

3 years ago | 0

| accepted

Answered
How to change x-axis without changing datapoints?
Here are two ways of changing the plot — x = linspace(536000, 543000, 500).'; yax = linspace(532900, 533400, 500).'; B =...

3 years ago | 0

| accepted

Load more