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...

2 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...

2 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...

2 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...

2 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...

2 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...

2 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 ...

2 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...

2 years ago | 0

| 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...

2 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];...

2 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...

2 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...

2 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...

2 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. ...

2 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...

2 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...

2 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',...

2 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...

2 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...

2 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...

2 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 =...

2 years ago | 0

| accepted

Answered
An EEG dataset .txt , I want to transpose the rows and columns for all files.
I would still keep them as they are in the files, and transpose them after you read the files. EEG = readmatrix('S9 HC.txt') ...

2 years ago | 1

Answered
How to import range of text files into different matrices?
I do not know anything about the file contents, so the easiest way would be to save them to cell array elements. D = cell(50,...

2 years ago | 0

Answered
I have an error saying 'Operator '*' is not supported for operands of type 'function_handle'." and I do not know what to do.
Function handle calls need to be evaluated. You code came close, however the syntax did not allow them to actually be evaluate...

2 years ago | 0

| accepted

Answered
Arrays have incompatible sizes for this operation.
The problem is: v = logspace(6, 11, 1000); % Using logspace for a smoother frequency range since everything else has a length...

2 years ago | 1

| accepted

Answered
Poctave bars next to each other
I cannot replicate your results with my prototype signal. The current ‘BarLayout’ property in your plot is 'stacked'. You ne...

2 years ago | 0

| accepted

Answered
Smoothing 3D surface plot and its color gradient
Experiment with the daspect function — filename = 'Data.csv'; data = readmatrix(filename); x = data(:, 1); y = data(:, 2)...

2 years ago | 1

| accepted

Answered
Pre-processing Data (PRV Signals)
The Signal Processing Toolbox resample function is specifically intended for signal processing and incorporates anti-aliasing fi...

2 years ago | 1

Answered
Trying to do a Laplace transform on a discontinuous function
I initially wanted to see if piecewise would work. It didn’t. This is the result I get using heaviside to define the areas o...

2 years ago | 0

Answered
Plots multiple lines-of-best-fits instead of just one
The data are missing, so an exact solution is not currently possible. The additional lilne could be that you are plotting bot...

2 years ago | 0

Load more