Answered
Name Contour levels outside plot
It took longer than expected for me to get this to work. NOTE — It only works for contours that intersect the y-axis on the r...

4 years ago | 1

| accepted

Answered
need help to plot confidence interval
That looks like my code from a very long time ago! If the Statistics and Machine Learning Toolbox is available, use fitlm and...

4 years ago | 0

Answered
How do i plot probability density plot with actual values?
If the distribution function is provided, along with the necessary parameters (none of which are prrovided here), this is straig...

4 years ago | 1

| accepted

Answered
How to signal divide into windows of lengths [1024] .
Use the buffer function. It will do everything desired. signal = 1:100; winlen = 10; ...

4 years ago | 0

Answered
how to find the length of interpolated graph?
The length of the graph (interpolated values) is the length of the interpolation vector ‘xq’ and here is a (1x21) vector. ...

4 years ago | 0

| accepted

Answered
How to calculate Shapley Values
I had no idea that shapley even existed until now, so I have no experience with it. However, one possible problem is that ‘ar...

4 years ago | 0

Answered
How do I sum a vector (row) to a matrix?
This involves a bit of indexing. Note that the rest of ‘A’ is unchnaged, and onlly ‘A(1,:)’ is involved in the operation. ...

4 years ago | 0

| accepted

Answered
displaying different length vector by graph
The only way to do that without using correxponding ‘x’ vectors is to plot them in a loop — y1=[2 5 7]; y2=[1 1 3 4 5 7 8 9];...

4 years ago | 0

Answered
How would you go about solving an equation of the type given?
With one equation in two unknowns, no solution likely exists unless analytic expressions for or (preferably both) exist, or a ...

4 years ago | 0

| accepted

Answered
Harmonic current by using FFT
That looks like it should work, although for the most accurrate results, divide ‘x_fft’ by the row size of ‘x’ or since it is a ...

4 years ago | 0

| accepted

Answered
Line plot not showing up in for loop iteration
I can’t run the code. However it’s obvious that ‘f’ needs to be a vector in order to plot anything other than the markers. C...

4 years ago | 0

| accepted

Answered
how to solve a higher order boundary conditioned differential equation with matlab function
This now runs. One problem was that ‘deriv’ is actually a reserved name, so I changed it. Also the ‘guess’ function was inco...

4 years ago | 0

Answered
R2 between histogram and (weibull) distribution
Try something like this — wblfcn = @(p,x) wblpdf(x,p(1),p(2)); Weibull.Wh_Wp = wblrnd(150, 3, 1, 100); X=linspace(min(Wei...

4 years ago | 0

| accepted

Answered
Z- Transform Problem Confusion
The ztrans function could be useful here — syms n t x(n) X(z) y(n) Y(z) z Eqn1 = y(n) == 2*y(n-2) + y(n) + x(n) Eqz1 = zt...

4 years ago | 1

| accepted

Answered
Pc requirements for MATLAB
See: Platform Road Map for the MATLAB and Simulink Product Families .

5 years ago | 0

Answered
How simplify numeric symbolic fraction coefficients
This almost gets there, however vpa apparently does not work on anyting except integers, so not on decimal fractions. syms ...

5 years ago | 1

| accepted

Answered
How can I calculate the angles between a polygons vertices?
Try this — X_Y_Val = [0.29218, 0.17609 0.56518, 0.27635 0.69555, 0.16324 0.83819, 0.4948...

5 years ago | 1

| accepted

Answered
Start Geoscience with MATLAB
Given your background, visit the Geophysics faculty in the Geosciences school in your university. They should be ablle to guide...

5 years ago | 0

Answered
How to find all the intersections where multiple lines cutting a curve?
It would help to have the curve coordinates. Try this — t = linspace(0, 2*pi, 150); ...

5 years ago | 0

Answered
Minor x-ticks not appearing.
It’s plotting a duration array, so there actually are no minor ticks. Likely the only way to deal with that is to change the 'X...

5 years ago | 1

| accepted

Answered
Some data not showing up
All the data are there, and are visible with sufficient scrolling. For example — Data = randi(9, 7, 3, 4) Scroll down t...

5 years ago | 1

| accepted

Answered
Need help setting up the piece-wise functions for Fourier transfer in MATLAB
Since the homework problem specifies symbolic calculations, the piecewise funciton could be appropriate here. .

5 years ago | 0

Answered
Calculate R^2 of two graphs
One approach — x = linspace(0.1, 85, 50); % Create Data y = atanh((x-mean(x))/ma...

5 years ago | 0

| accepted

Answered
Outer edges on a patch surface
One option could be contour3. .

5 years ago | 0

Answered
Pulling a column from a matrix to a vector
Try this — M = [1 0.318524 5 2 0.534064 4 3 0.0899507 3 4 0.111706 2 5 0.136293 1]; vector1 = M(:,1) And so for the ...

5 years ago | 1

| accepted

Answered
how to extract the data for specific interval?
I am not exactly certain what the desired result is, however the retime funciton will likely produce it, regardless. Assuming...

5 years ago | 0

| accepted

Answered
preparing symbolic ODE for ode45
Try something like this — syms gamma(t) T Y C1 = 2.4 C2 = 3.1 ode = diff(gamma, t, 2) == C1 * sin(gamma) + C2 * cos(diff...

5 years ago | 0

| accepted

Answered
find local minima within a time window of interest
To find the minimum using findpeaks, multiply the first argument (‘y’) by -1 so the minimum becomes a maximum. Do not use the s...

5 years ago | 0

| accepted

Answered
I want to find the position of cells with a specific content, but the empty cells are not counted, so I take a wrong result of position
The ‘b’ variable will contain the numeric indices from the logical vector that ismember returns, so ‘a{b,1}’ should return the d...

5 years ago | 0

Answered
Finding a change in a variable due to a change in another variable
See if the griddedInterpolant function will produce the desired result p=200:1000; t=210:305; [P,T] = ndgrid(p,t); Z = T.*...

5 years ago | 0

| accepted

Load more