Answered
Delete parts of plotted figures?
Try this: axis equal hold on caca=2*pi(); ang=linspace(0,caca); xp=5*cos(ang); yp=5*sin(ang); circ=[xp;yp]; L1x = lin...

6 years ago | 0

| accepted

Answered
Getting Empty sym: 0-by-1 when using solve function
First, ‘[M1,M2,M3,M4,M5,]’ do not exist anywhere, so please do not refer to them. Second, the correct syntax for solve is: ...

6 years ago | 0

Answered
Initial and end artifacts after applying digital filter (filtfilt)
In many situations that is caused by the signal having a significant d-c (constant) offset. There are two general ways to deal ...

6 years ago | 0

| accepted

Answered
Can someone tell me why my graph isn't plotting?
Subscript ‘Cl’ and ‘Cd’ in the loop: Cl(i) = (Fl(i)/(Pd(i)*A)) Cd(i) = (Fd(i)/(Pd(i)*A)) .

6 years ago | 0

| accepted

Answered
Plot Solid Positive-Valued/Dashed Negative-Valued Contour Plot
The contour function itself cannot do that, however it is srtaightforward to adapt it: [X,Y,Z] = peaks; figure hold on [C...

6 years ago | 0

| accepted

Answered
plot cdf and calculate 90th percentile value
To plot the dashed lines at the appropriate percentiles: pctl = [50 90]; pctlv = prctile(z_cdf,[50 90]); % answer is 30.9361 ...

6 years ago | 0

Answered
How to find the slope of the tangent on the graph at X=0 and Y=0 for the given current-voltage graph
I am not certain what you want. See if the gradient funciton does what you want. It requires evenly-spaced data with known d...

6 years ago | 1

| accepted

Answered
How to show the plot with the highest value?
One approach would be ‘logical indexing’: h = linspace(0,25); T1 = 20 - h; T2 = 10 + h; Lv = abs(T2) > abs(T1); ...

6 years ago | 0

| accepted

Answered
how can calculate irragular shape volume
Experiment with this approach: F1 = openfig('surfShape.fig'); Surfc = F1.Children.Children; X = Surfc.XData; Y = Surfc.YDat...

6 years ago | 0

Answered
ODE 45 and function combination
I cannot run your code, since I do not have the ‘Tamb’ data. Nevertheless ‘Tamb’ is likely the problem, since it appears to b...

6 years ago | 1

Answered
Time derivative then partial derivative of symbolic function
Just do: h = diff(g,x); and it works.

6 years ago | 0

| accepted

Answered
How can I fix the if statement issue in my code?
Replace the if block with: P_ABP = max(P_ABP,0); P_ACP = max(P_ACP,0); With that, I got no negative values whe I ran your co...

6 years ago | 0

| accepted

Answered
Why is my findpeaks function not working here?
You likely have significant noise, and hte noise is being detected as peaks. Use the 'MinPeakProminence' name-value pair to ret...

6 years ago | 0

Answered
hope to add the graph line, It is basic please help
Create a vector out of the ‘vgs’ quantities you want to plot: vgs=[0.7 1 1.5 2]; then use a second loop to index them: W=40...

6 years ago | 0

| accepted

Answered
Zero crossings and separation of data
Use the envelope function to define the ‘outline’ of the upper portion of the signal (and the lower portion if you want that), t...

6 years ago | 0

| accepted

Answered
Issue with velocity signal from measurement
First, if you want to eliminate noise, use a lowpass filter, and if you have a significant amount of baseline offset or baseline...

6 years ago | 0

| accepted

Answered
ode with varying constant
Interpolating a time-domain vector in a differential equation is essentially described in the ode45 (and other solvers) document...

6 years ago | 0

Answered
plotting 2 graphs on the same axes
Use the hold function.

6 years ago | 1

| accepted

Answered
Calculate shifts/translation between two curves
The blue curve is not ‘shifting’. It has a different scale with respect to the independent variable than the purple curve. The...

6 years ago | 0

| accepted

Answered
Index exceeds the number of array elements (10).
In this line: A(i)=(x(i+3)-x(i))*((y(i)+3*y(i+1)+3*y(i+2)+y(i+3))/8); ↑ ← HE...

6 years ago | 0

Answered
Unable to perform assignment because the left side is 1-by-3 and the right side is 1-by-2
I’m not certain what you’re doing with that line. The standard way of coding it (to put errorbar objects or text objects at t...

6 years ago | 0

| accepted

Answered
Why does my code only come out with one result?
Call it as: [siftedData, siftedMean, siftedStd, siftedNorm] = project2(rawData, categories, selectedCategory) and all the ou...

6 years ago | 0

| accepted

Answered
How to add error bars to a bar graph
See: error bars in bar plot with categories for one example.

6 years ago | 0

| accepted

Answered
How do I use an unusual base in a semilogx plot?
See if this works for what you want to do: x = 1:5; y = 1.85.^x; figure subplot(2,1,1) semilogx(x, y) ...

6 years ago | 0

Answered
converting abbreviation of months to numerical value
Another approach: mnth_nr = @(mth) find(strcmpi(mth, {'jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'}...

6 years ago | 0

Answered
How to get upper and lower bounds values from an empirical cumulative distribution?
Using the prctile funciton on ‘cdf_y’ may work to calculate the percentiles (that appear to be what you want). To get the appro...

6 years ago | 1

| accepted

Answered
Plot not showing line fully
There may be some problem with the graphics rendering. See if an update to your graphics driver is available. Otherwise, add...

6 years ago | 0

| accepted

Answered
Understanding the FFT documentation
Your understanding essentially equates to my understanding of fft. It produces a ‘two-sided’ Fourier transform with the first v...

6 years ago | 0

| accepted

Answered
Making graph at the every for loop
First, if you are defining each plot in a separate figure, remove the figure call in the loop and put it before the loop. Jus...

6 years ago | 0

Answered
How do I add variables into a string within a table?
The only option appears to be to turn the string variable into a char array first: str = "0001336363"; strc = char(str); Out...

6 years ago | 0

| accepted

Load more