Answered
(1/2) - (3-j4)/(5-j8)
Calculating it is straightforward. Multiply the numerator and denominator of the complex part of the expression by the complex ...

9 years ago | 0

| accepted

Answered
How do i shift values?
If *|‘sampleReadings’|* is _always_ going to contain only three elements, address the last two elements of the existing *|‘sampl...

9 years ago | 0

Answered
Working with ODE23 - Using a given data set
The only guidance I can offer is my (eventually successful) solution to the Question in <http://www.mathworks.com/matlabcentral/...

9 years ago | 0

Answered
Displaying color bands side by side
The arguments to the *|subplot|* function are: subplot(number_rows,number_columns,plot_number) Your code asks them to p...

9 years ago | 0

Answered
How can I use Convolution (1D and 2D) in MATLAB? Please do give an example.
Probably the best examples are in the MathWorks blogs that pointed me to this File Exchange contribution: <http://www.mathwo...

9 years ago | 0

Answered
Using fzero to solve an equation
I defaulted to the Symbolic Math Toolbox to solve this: syms s t Km = 1.25; Vm = 1.5; S0 = 5; eqn = Vm - ...

9 years ago | 0

Answered
smooth line of semilog plot
Your data _appear_ to be able to be modeled by a <https://en.wikipedia.org/wiki/Logistic_function *Logistic function*> (link). ...

9 years ago | 0

| accepted

Answered
How to use polyfit command to find the linear approximation of the data
A linear approximation is a first-degree polynomial, so specify it as: p = polyfit(x, y, 1); The polynomial degree is t...

9 years ago | 0

Answered
Code wont work keeps giving error message: Argument to dynamic structure reference must evaluate to a valid field name.
Put the ‘dot operator’ here instead: y = a*(exp(-z*wn*t)) .* (sin(wd*t)) ↑ That will do the el...

9 years ago | 0

Answered
plotting 3d graph in matlab
Use element-wise operations: c_one=0.9; c_two=0.1; f = @(x,y) (c_one.*x + c_two.*y)./(x+y) [X,Y] = meshgr...

9 years ago | 0

Answered
How can I plot just a slice of circle that shows the degree of temperature
I would use the *|pol2cart|* funciton: theta = linspace(-pi/8,pi/8,7); r = linspace(0,1,10); [AA,RR] = meshgrid(thet...

9 years ago | 0

| accepted

Answered
Matlab Ttest2 changing significance level
One option would be to use the *|histift|* function on each data set to see how they are distributed. Other options exist to te...

9 years ago | 0

| accepted

Answered
please help not able to solve this linear equation, i have tried equ(1).x
Use the *|roots|* function, and avoid the Symbolic Math Toolbox for this simple problem: for Y = 1:40 equ{Y} = root...

9 years ago | 0

Answered
Time Complexity of Double Integration
Unless you need a symbolic integral, the Symbolic Math Toolbox is not the preferred method. I would do the integration using th...

9 years ago | 1

| accepted

Answered
residuals from histfit result
I’m not aware of one. One approach that avoids the need to extract the parameters of the distribution and calculate the cur...

9 years ago | 0

| accepted

Answered
How can I have 'angstrom square' as unit of y axis in a plot?
You forgot the dollar signs *|($)|*: figure(1) plot(rand(1,100), rand(1,100), 'pg') ylabel('$MSD (\AA^{2})$','Interp...

9 years ago | 2

Answered
Best method to define constants used by several functions
Change your functions to allow the constants to be passed as extra parameters, possibly as one parameter vector that can then be...

9 years ago | 0

| accepted

Answered
Help with Fourier Transform
I am not certain what you want. To understand how to calculate the Fourier transform in MATLAB, see the documentation on the <h...

9 years ago | 0

Answered
Intensity distribution of a curve
I would do something like this: x = -5:0.5:5; % Create Independent V...

9 years ago | 0

| accepted

Answered
how can i solve this problem related to pssh?
One problem is that the number of initial conditions needs to equal the number of derivatives you are integrating. I set *|‘ic’...

9 years ago | 0

Answered
i am trying to plot the equation y=mx+b but matlab doesn't show the curve
Try this: m=125; b=-100; x=1:5; y=124*x+b; plot(x,y) grid

9 years ago | 0

Answered
Vertical lines with text in plot
To draw the lines, you need to specify duplicate *|x|*-coordinates to match the two-element *|ylim|* vectors. Here, the *|ylim|...

9 years ago | 2

| accepted

Answered
How to plot a graph with only positive x-axis and appropriate limits for y-axis of this codes ?
Try this: syms s t ys1 = ((21+6*s)/(2*s^2+7*s+3)); yt1 = ilaplace (ys1); ys2 = (1/(s^3+3*s^2+12*s+10)); ...

9 years ago | 0

Answered
Getting the frequency of all peaks after doing fft
There are several peak-finding algorithms in the File Exchange. Search the <https://www.mathworks.com/matlabcentral/fileexchang...

9 years ago | 0

Answered
how to draw a plot between frequency and duty cylce for class DE operation to find the optimum values for the frequency and duty cycle
You did not code your *|linspace|* call correctly. I corrected that and vectorised your *|‘wr’|* and *|‘wx’|* calculations, rep...

9 years ago | 1

Answered
Adding Second Line to Text Box in Plot
Combine both lines in one *|sprintf|* call to print a two-line text: ResTime = 0.10; figure(1) plot(rand(1,5)-0....

9 years ago | 1

| accepted

Answered
solving system of differential equations in matlab 2015
I would use the Symbolic Math Toolbox to create a function you can solve numerically: syms s(t) n(t) s0 n0 t Y Eqn = [...

9 years ago | 0

| accepted

Answered
To find unknown constants similar to polynomial division
Using the Symbolic Math Toolbox: syms b c K x Eqn = x^4 + (3+K)*x^3 + (4*K)*x^2 + 5*x +9 == (x^2 + 3*x + 2)*(x^2 + b*x...

9 years ago | 1

Answered
Estimate confidence intervals after regress!
The *|‘BINT’|* matrix contains the _parameter_ confidence intervals. If you want both _parameter_ and _prediction_ confiden...

9 years ago | 1

| accepted

Answered
how to find the change in curve
Try this: D = load('ridx.mat'); ridx = D.ridx; ridx = max(ridx)-ridx; x = 1:length(ridx); dt_ridx = detren...

9 years ago | 1

Load more