Answered
How do you find the intersection points of two functions?
It is straightforward to show that P>A for the entirety of ‘n’. They do not ever intersect: n=1:110; A=10+0.5*n; P=8*exp(...

7 years ago | 0

Answered
Error while trying to use diff comand
It is not clear to me what you want to do. If you want to take the numerical derivative of ‘Id’ using step size ‘Vt’ use the ...

7 years ago | 0

Answered
how to run an index loop while using find function
‘But I'm stuck at finding a proper function to find A single PPG coordinate near ECG in fixed range and make it work with index ...

7 years ago | 0

| accepted

Answered
MatLab won't allow me to label the columns in a table that I created
You are not creating your table correctly, and you are not using the correct syntax to set the row and column names. Try this...

7 years ago | 0

| accepted

Answered
Contour plot of concentration of chemical species
Try this example: xy = randi(9, 100, 2); % Matrix Of ‘x’ and ‘y’ Positions [Uxy,ia,ic] =...

7 years ago | 1

| accepted

Answered
How to overlay my data point plot on Bode plot?
Probably the easiest way is to have bode return the data it calculates as outputs using the techniques in Obtain Magnitude and P...

7 years ago | 0

Answered
Data set must contain at least 3 samples error in find peaks embedded in for loop
‘... columns of a matrix ...’ Note that: [pks{i,:},locs{i,:}] = findpeaks(bcgFixed(i,:),'MinPeakProminence',(bcgthresh*bcgS...

7 years ago | 0

| accepted

Answered
Theorical Question About Making Matlab Read Graphic
Click on this link to launch a File Exchange search for functions that scan and import data from a printed plot. One popular fi...

7 years ago | 1

| accepted

Answered
Moran Function, in command window print every calculation, and i don't want that
Put a semicolon ; at the end of each line you do not want to print to the Command Window. See: MATLAB Operators and Special ...

7 years ago | 0

| accepted

Answered
Solving Differential Equations using ODE45
I decided to let the Symbolic Math Toolbox have a go at your equations, since they involved some substitutions: syms S(t) X(t)...

7 years ago | 0

| accepted

Answered
Weighted average that takes error into account?
It depends on what you mean by ‘error’. In regressions, data are commonly weighted by the inverse of the variance, so the large...

7 years ago | 0

Answered
how to plot a prism
Use surf instead of plot3 if you want solid-appearing sides. Try this: figure surf([x;x].', [y;y].', [z,zz], 'FaceColor','...

7 years ago | 0

| accepted

Answered
How to combine all script windows into one window with tabs
You may need to undock the Editor. There is a small white triangle inside a white circle on a blue background in the upper righ...

7 years ago | 45

| accepted

Answered
Legend error (does not display 'line' in legend box)
Using: opengl('save','software') seems to be a solution for that problem. See: Use Software OpenGL for Future Sessions and...

7 years ago | 0

| accepted

Answered
Error using horzcat dimensions
I have no idea what your code does or what the variables are that you want to return. The easiest approach is to return a cel...

7 years ago | 0

| accepted

Answered
how can i put value of cell in vector?
Two options that come quickly to mind: S={1 ,2 ,3}; U = [S{:}] U = cell2mat(S) Obviously these only work if the cell conten...

7 years ago | 1

| accepted

Answered
How to set the interval of x-axis from a large value to a small value and set the steps of interval in fsurf
‘How do I set the steps to decades?’ Purely guessing, the logspace function could be appropriate, then set that axis to be loga...

7 years ago | 1

| accepted

Answered
How make a loop that finds my selected specific peaks and plots them on the graph
The findpeaks function has several name-value pair arguments that can help you do what you want, including defining them by prom...

7 years ago | 0

Answered
How to do simple Excel functions using Matlab instead
Since you actually want to take the numerical derivative (rather than calculate the differences between elements of your vectors...

7 years ago | 0

| accepted

Answered
Creating 3D Plot using Surf
One possibility is to preallocate ‘gamma’ as a vector, since it appears to be such in the rest of your code: gamma = zeros(siz...

7 years ago | 0

Answered
how to design a filter
Here is one for a bandstop filter: Fs = 2250; % Sampling Frequency F...

7 years ago | 0

Answered
need actual model in numerator,denominator form
You can get the numerator and denominator as: sys = tf({1 0;0 1},{[1 0 0 0],1;1,[1 0 0 0]}); Num = sys.Numerator Den = sys.D...

7 years ago | 0

Answered
simulation discrete-time model
To simulate your system with the appropriate input, use the lsim function. You will need to create a time vector as well as the...

7 years ago | 0

| accepted

Answered
While Loop Inside a function
Write it the same way you would write a while loop in a script. Also consider putting in a counter with a limited number of i...

7 years ago | 0

Answered
Inverse Laplace transform - there has to be a better way?
Try this: syms s t num = 9; denom = [1 9 9 0]; % [r,p,k] = residue(num,denom); nums = num; dens = poly2sym(denom, s); ...

7 years ago | 1

| accepted

Answered
Solving equation using for loop
Your code throws (as expected from reading it): Array indices must be positive integers or logical values. V(0)=0; MATLAB su...

7 years ago | 1

Answered
How can I add a trendline to a scattergraph of multiple data sets?
The lsline function needs a bit of help to give up its secrets. Try this: figure scatter(rand(1,10), rand(1,10)) hold on ...

7 years ago | 1

| accepted

Answered
coordinates from a fitted curve
The "linearinterp" function appears to be an R function. Use interp1 in MATLAB. Since you have to define the independent var...

7 years ago | 0

| accepted

Answered
ztrans doesnt work with transfer function
The ztrans function is part of the Symbolic Math Toolbox. You are mixing Control System Toolbox and Symbolic Math Toolbox objec...

7 years ago | 0

| accepted

Load more