Answered
visualization of huge matrix
See if the spy function will do what you want. Its purpose is to visualise sparse matrices, however it could work with yours ...

5 years ago | 1

Answered
Solve equation for one unknown with one known parameter
Try something like this — a=0.5; % x=linspace(-2*a,2*a,100) x=linspace(-2*a,2*a,20); eqn=@(x,y,a)(1/2*a^2)*[x^2./(2-(1-(x./...

5 years ago | 0

| accepted

Answered
Ploting graph on matlab
The function declines very rapidly, so use a different value for ‘t’ — % t = 0:1:100000; t = linspace(0, 2E-3, 500); ic = -...

5 years ago | 1

| accepted

Answered
plot x-axis data with discretize
Perhaps something like this — x = 0:2:24; y= rand(1,13); plot(x,y) xticks(0:2:24) % 'xtick...

5 years ago | 0

| accepted

Answered
Extracting data from .mat file
Use the load function, and specifically, Load List of Variables into Structure Array. The structure array then allows selection...

5 years ago | 0

| accepted

Answered
How to evaluate frequency response of a filter using freqz()?
This is not correct: [h,w] = freqz(b,a); %here, b is the impulse response vector and a is 1 plot(h, abs(w)); It shouild be: ...

5 years ago | 0

Answered
how to generate below sawtooth pulse
Another approach using a logical threshold (specific to this waveform) — t = linspace(0, 7, 500); s = rem(t,2); s = s.*(s<1)...

5 years ago | 0

Answered
Matlab issues with plotting a variable
There are gaps in the ‘Base Speed’ variable, so these need to be detected and the corresponding rows of ‘Cores’ eliminated in or...

5 years ago | 0

| accepted

Answered
Perform inverse weighted least squares regression
‘Would this be 1/error of each point?’ That would appear to be a reasonable approach, since the data with the smallest errors...

5 years ago | 0

| accepted

Answered
Finding the frequency and the phase shift of a Sin signal
One option is described in Curve fitting to a sinusoidal function and a version that could be more appropriate to your problem ...

5 years ago | 1

| accepted

Answered
Find all possible ordered pairs that satisfy a linear equation
The ‘all possible’ criterion would produce infinite solutions. I suspect you would spend the rest of your life calculationg it!...

5 years ago | 0

Answered
cell2table is not recognizing certain columns (not all) containing double data
I am not certain what the problem is with readcell, however unless it is absolutely necessary to use it, use readtable instead, ...

5 years ago | 0

Answered
Simulation of drug distribution with ordinary differential equation
The syntax was not passing the parameters correctly to ‘ode_ex’, and was not passing to correct arguments, at least from what I ...

5 years ago | 0

| accepted

Answered
What is a more efficient method of increasing non-zero entries by one
I am not exactly certain what you want to do, however it is straightforward to do this using logical indexing — R = [0, 0, 4, ...

5 years ago | 0

| accepted

Answered
is poctave function working ?
The code you posted runs correctly in R2021a, since it runs correctly in the online Run feature here that uses it — Fs = 44.1E...

5 years ago | 0

| accepted

Answered
Undefined operator '*' for input arguments of type 'categorical'.
I am not certain what the problem is, and some information is not available. Try something like this — sample = readtable('...

5 years ago | 1

| accepted

Answered
Export/Copy Plot Line Values
Try siomething like this — x = 0:10; y1 = x.^2; y2 = 50*sin(2*pi*x/10)+50; figure hp = plot(x, y1, x, y2); Line1X = hp...

5 years ago | 1

| accepted

Answered
Error in multiplying corresponding elements in two matrices
It is often confusing to use ‘l’ (lower-case letter ‘L’) and ‘1’ (number ‘1’). I suspect that is the problem.

5 years ago | 1

| accepted

Answered
Find difference between two measurements
Without knowing what the data are, one option would be to use interp1 to determine the same values at specific times. I have ...

5 years ago | 0

Answered
Solve 3 unknown variable system of equations
There are likely an infinity of solutions. Also, for whatever reason, the solve function does not like ‘L6’. A numeric a...

5 years ago | 0

| accepted

Answered
Error using sym>convertChar (line 1537) when solving an ODE using laplace transform. How to fix the problem?
Eliminate the single quotes, use double equal signs in the symbolic expression, express ‘x’ as ‘x(t)’ in the syms declaration (o...

5 years ago | 1

| accepted

Answered
Curavture/Slope Filtering
One approach could be to look for changes in the slope (using the gradient function here) with respect to the number of elements...

5 years ago | 1

| accepted

Answered
How can I find the heart rate and R-R time interval for ECG Signal?
Getting the information from the file was something of an adventure! I likely could have done this with detectImportOptions, ho...

5 years ago | 1

| accepted

Answered
Help me with Graph plot
One approach — syms x y = 6*x^3 - 37*x^2 + 37*x - 10 figure fplot(y) grid .

5 years ago | 0

Answered
Solve the 2-nd order differential equations y"+2y'=3x
One approach would be to do this symbolically and solve it using the dsolve function.

5 years ago | 0

| accepted

Answered
Error with ode45
Supply the ‘t’ argument even if the code does not use it. Try this — t=[0 5]; inity = 1; [t,y]=ode45(@f, t, inity); plot...

5 years ago | 0

| accepted

Answered
Data import and Header Line
There are several ways to do this, likely the easiest is to use the readmatrix function (introduced in R2019a).

5 years ago | 0

| accepted

Answered
Error while using cellfun with a function
Try this instead — RRTrain1 = cellfun(@(x)RRfeatures(x),XTrain,'UniformOutput',false); I have no idea if that will do what yo...

5 years ago | 1

| accepted

Answered
Strange curve fitting with large polynomial degrees when using polyfit
As a general rule, a polynomial fit with a degree grater than 7 is likely not appropriate, so a 100 degree polynomial is giving ...

5 years ago | 1

Answered
How to group companies by SIC codes
The discretize function could be appropriate for this.

5 years ago | 0

Load more