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

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

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

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

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

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

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

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

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

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

3 years ago | 0

Answered
Data analysis - How to recognize local peaks/different areas?
It would help to have the data. It is relatively straightforward to get the start and end times and then store the relevant d...

3 years ago | 2

| accepted

Answered
Why do i get an error saying "Unrecognized function or variable 'x'."
You have not defined ‘x’ specifically in your calling script prior to calling the function. Try something like this — x = ...

3 years ago | 0

Answered
Trouble importing data from folder
I’m not certain that I understand what you want to do. If you want the number from the file name, perhaps something like thi...

3 years ago | 0

Load more