Answered
Legend displaying the same color for all lines
Each plot call creates 1000 Line arrays. Just pass the first of each to legend and it works — angle_steps = 1000; theta = ...

4 years ago | 0

Answered
Can you help me guys i cant plot this this graph using matlab
Try this — x = linspace(0, 10); y = 1 - exp(-0.7*x); figure plot(x, y) hold on plot([0.9 1.75]-0.1, [1 1]*0.4, 'k') pl...

4 years ago | 0

Answered
response of state space to arbitrary input
‘what if i want to give a non-trivial input different from step, like a traingular wave??’ Use the lsim function. That is th...

4 years ago | 0

| accepted

Answered
how to find the transfer function from LTspice
Perhaps I am missing something, however ‘the expression of the transfer function i plotted as a function of the frequency’ is es...

4 years ago | 0

| accepted

Answered
How to do symbolic integration
It apparently does not have a symbolic solution (this is not uncommon). It does have a piecewise closed-form solution, at lea...

4 years ago | 2

Answered
Resolve problem of overlapping title and yticks
I cannot reproduce that in R2021b (using synthetic data), however the NumericRuler Properties Exponent property could work. It ...

4 years ago | 1

Answered
How can i find the peak/maxima of a plot in just a selected region?
I am not exactly certain what the problem is, however I am assuming that there are many peaks and the intent is simply to get th...

4 years ago | 0

Answered
I want to use a code but one of the symbol/character I don't recognize, Please help.
The ‘ear’ is the ‘at-sign’ (@) and here is used to denote a function handle. It is used to define anonymous functions, for exam...

4 years ago | 0

Answered
how to find unknown within equation having unknown
I have no idea if this actually has a robust (and mathematically correct) solution. It is always appropriate to experiment, s...

4 years ago | 0

Answered
Source code for Heart Disease Prediction
PubMed

4 years ago | 0

Answered
How do I stop MATLAB from giving me this warning? ( Global variables are inefficient and make errors difficult to diagnose. Use a function with input variables instead.)
The obvious solution is DO NOT USE GLOBAL VARIABLES! Here, thie solution is — x=5; A = hello(x) function A=hello(x)...

4 years ago | 1

| accepted

Answered
Reverse-Engineer Amplified Signal to Obtain Raw Signal
It is somewhat difficult to understand what ‘1 mV/unit’ translates to, since ‘unit’ can be anything. Also, ‘-20 dBV attenuation...

4 years ago | 1

Answered
How to get the corresponding data ?
If only the 24-hour sum is available, it is not possible to get the time history. If the times and incremental volumes are av...

4 years ago | 0

Answered
How to calculate phase difference between 2 periodic signals recorded from oscilloscope?
One approach — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/840620/data.CSV', 'VariableNamin...

4 years ago | 1

| accepted

Answered
How to increase temporal resolution from 3-hourly to hourly data with interpolation?
If the Signal Processing Toolbox is available, the easiest way to do that is with the resample function. .

4 years ago | 0

Answered
Filled contour plot colormap
Tell contourf to use more colours — Levels = hcf.LevelList colormap(parula(numel(Levels)) and the individual patches become ...

4 years ago | 0

| accepted

Answered
Is that the correct way to plot the graph ?
It plots ‘t’ correctly and plots it — plot(n1,ts1,'LineWidth',1); however the sprintf is not going to produce anything becaus...

4 years ago | 1

| accepted

Answered
Plotting Two Consecutive Columns of Matrices
First a (4 x 202) matrix defines a matrix of 4 rows and 202 columns. Assuming that it’s actually a (202 x 4) matrix, perhaps so...

4 years ago | 0

| accepted

Answered
Is it appropriate to use ranksum to compare statistical means for time series data?
I have a textbook that discusses it briefly, and it appears to be a subset of the rank-sum test, with a different calculation of...

4 years ago | 0

Answered
How to shade a graph (full and some part)?
Try something like this — y = linspace(0,10); % Assume Row Vectors (Actual Data Not Pr...

4 years ago | 1

| accepted

Answered
Non-Linear Regression of 4 Independent Variables and 1 Dependent Variable
This is relatively straightforward to do. The indpendent variables must all be in a matrix (I prefer column-orientation, so I a...

4 years ago | 0

Answered
Why does polyfit/polyval not work for fitting a 2nd degree polynomial to my dataset?
Nothing is wrong. The data simply need to be sorted in order to plot the regression equaiton correctly. Try this first — L...

4 years ago | 2

| accepted

Answered
Is there a way I can convert image (pixel) values ​​to Raman shift using MATLAB?
They appear to me to be different data. However, filtering out the high-frequency noise is likely as close as it is possible ...

4 years ago | 1

Answered
Add rows to table, not append
One approach is to duplicate the table by first moving everything from the second row to the end down one, then inserting the ne...

4 years ago | 0

Answered
Trying to change plot style
‘Trying to display correlogram as the picture seen below what do I have to add to my code:’ The plot in the documentation is ...

4 years ago | 0

| accepted

Answered
plot 3 D graph when dimension of matrices doesn't agree
Just make them match! Try this — u=[2.22044604925031e-16 0.0166288189049042 0.0642880296655506 0.136295894416653 0.221516...

4 years ago | 0

| accepted

Answered
Trying to plot correlogram of time series data
Essentially all physiological variables are lognormally distributed. This is inutitively obvious because physiological variable...

4 years ago | 0

| accepted

Answered
CAN ANYONE SAY THAT WHAT IS MY PROBLEM IN THIS CODE? HOW CAN I SOLVE IT ?
Well, obviously it’s being run without any (or enough) input arguments. The most likely cause is that it is being run as a sc...

4 years ago | 0

Answered
bode() yields wrong result
There is a typographical error in ‘f2’ and correcting it produces the desired result — s = tf('s'); f1 = 0.99 * 18.88; f2 ...

4 years ago | 0

| accepted

Answered
Increase outer position width while keep inner position unchanged
I am not absolutely certain what the desired result is, however here is an illustration (although the online Run feature is not ...

4 years ago | 0

| accepted

Load more