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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 0

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 0

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 1

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

circa 3 anni fa | 0

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 0

| accettato

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 1

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

circa 3 anni fa | 0

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

circa 3 anni fa | 0

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

circa 3 anni fa | 2

| accettato

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

circa 3 anni fa | 0

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

circa 3 anni fa | 0

Risposto
Linear Algebra Error: Matrix is close to singular or badly scaled.
I am not certain what you want to do. Consider using the pinv function.

circa 3 anni fa | 0

| accettato

Risposto
How to evaluate an equation with sin and cos at different values in radians.
Vectorise it (note the element-wise operations) — x = [0; pi/2; pi; 3*pi/2]; f = (-0.05-0.01*x)./((5*x+0.3).*cos(x)+(0.2*x.^2...

circa 3 anni fa | 1

| accettato

Risposto
Problem using tf to perform a transfer function.
You need to have the Control System Toolbox licensed and installed. With that, the code works appropriately — numg=[6 0 1];...

circa 3 anni fa | 1

| accettato

Risposto
How print the loop iteration value each time to show progress of loop during a run
I am not certain what you want to do, however when I have done something similar, I usually do something like this: k = 12345;...

circa 3 anni fa | 0

| accettato

Carica altro