Answered
make my curve smooth
This is as close as I can get to what you want: filename = 'All Data_10mm.xlsx'; sheet = '10 mm_1hz_0V_Test1'; % add she...

7 years ago | 0

| accepted

Answered
Compare 2 arrays with find()
The ismember function may do what you want: x = 1:1:3; Points = [1 3 2 1 1 3 4]; [~,Out] = ismember(Points, x) producing:...

7 years ago | 1

| accepted

Answered
How can I plot multiples lines with differents radius scales in the same figure?
The polar and polarplot functions do not allow logarithmic radial axis scaling (taking the log of the radius will be impossible ...

7 years ago | 0

Answered
How to plot multiple surfaces on different planes in the same plot?
One way would be to offset them by a constant: [X,Y] = meshgrid(-2:0.1:2); Z1 = X.^2 + Y.^2; Z2 = X.^2 - Y.^2; Z3 = cos(2...

7 years ago | 0

| accepted

Answered
Problem with a model
Most likely, you have a period (.) where you probably intend to put a coma (,).

7 years ago | 0

Answered
How to find the slope of the curve at x=0 and y=0
Since you did not share your data, I created my own. This should get you started: x = linspace(-0.5, 1.5); ...

7 years ago | 1

Answered
Input coordinates cannot be complex.
If you can read the entire file with readtable and you simply want the data in the table, consider using the table2array functio...

7 years ago | 1

| accepted

Answered
I am having problem with the code written below. It is a code for finding stored strain in a polymer. Some of the errors that are coming are index exceeds matrix dimension, matrix dimensions must agree, etc. Kindly help me out.
Try this: syms epre et es(T); %stored strain Tl = 273; Th = 358; Tg = 343; Ei = 813E6; %modulus corresponding to the inter...

7 years ago | 0

| accepted

Answered
Mesh/Surf plot of function with if statements
Try this: Z1 = (2*sqrt(100*X.^2+75*Y.^2)).*((4*X.^2+3*Y.^2)<=225); Z2 = (75+4/3*X.^2+Y.^2).*((4*X.^2+3*Y.^2)>225); Z = Z1 + ...

7 years ago | 0

| accepted

Answered
Representing data as surface
See if adding view(20, 20) after your surf call does what you want.

7 years ago | 0

Answered
How to find the coordinates of starting, end point and peak from graph?
Try this: x = linspace(-5,5); y = sqrt((36-x.^2)/9); figure() plot (x,y) [onePeak,loc] = max(y) ...

7 years ago | 0

| accepted

Answered
T-test on two classifiers
I seriously doubt that a t-test or anything similar to it (even non-parametric tests) are appropriate to compare classifiers. ...

7 years ago | 0

| accepted

Answered
Plot function not work
Your ‘plot.m’ script is overshadowing the MATLAB plot function. Change your script file name to ‘myPlot.m’ or something that do...

7 years ago | 0

Answered
How to plot this while loop?
Try this: t=0; x=[1,1,1]; v=x(1); vc=sin(t+1)-cos(0.5*t-2); sigma=v-vc; alpha=30; tau=0.0001; k = 1; ...

7 years ago | 1

| accepted

Answered
merging two plots of different program
I woiuld save the plot created in the first script as a .fig file using the savefig function, then in the second script use open...

7 years ago | 1

| accepted

Answered
Calculate derivatives in a non-uniform grid
The gradient function is an option, specifically: dydx = gradient(y) ./ gradient(x); for vectors, or more generally for matri...

7 years ago | 0

Answered
The resolution on the spectrogram plot is WAY too low
Experiment with more elements to your frequency vector, for example: spectrogram(datVec,fs,[],[3:3:300],fs) I’m not certain t...

7 years ago | 1

| accepted

Answered
Plot all for loop results
Don’t number the figures. They will increment themselves. Try this: t=linspace(1,20,10000); %10000 Datapoints f1=8; f2=9...

7 years ago | 1

| accepted

Answered
Axis problem in contour plotting
If you use the meshgrid outputs (with one additional argument, so one additional matrix) you get the result you want. It also a...

7 years ago | 2

| accepted

Answered
How do I add a legend to my plot?
To add the legend, either use sprintfc (undocumented although quite useful): lgndc = sprintfc('IC = %.1f',conds); legend(lgnd...

7 years ago | 1

| accepted

Answered
How to make 'far away' markers appear smaller (perspective)
One option is to use a sort of ‘inverse square’ size dimension scaling function. Example — x = rand(1,10); y = rand(1,10);...

7 years ago | 0

| accepted

Answered
How do i calculate the area under curve for 2 curves
It depends on the result you want. Note that the last values in your vectors are NaN, so that is going to cause problems in you...

7 years ago | 0

| accepted

Answered
How can I get function expression for Cumulative distribution function
Likely the easiest way to estimate the parameters is with the Statistics and Machine Learning Toolbox fitdist function: x = ra...

7 years ago | 0

| accepted

Answered
Interpolating unequally spaced data
Use the Signal Processing Toolbox resample function: [D,S] = xlsread('Vinf9P12RPM2981K0I0B0V2.000001.xls','Group 2'); Fs = 1/...

7 years ago | 0

| accepted

Answered
Extract peaks and troughs from a curve
If you want to identify the individual peaks and troughs, use islocalmax and islocalmin, or findpeaks on the positive and negati...

7 years ago | 4

| accepted

Answered
Ignoring text output from viscircles command
Put a semicolon (;) at the end of your viscircles call.

7 years ago | 1

| accepted

Answered
How to adjust the length of each cell array in a nested cell array for SWT Denoising?
I am not certain how you are doing the denoising. However getting the vectors to the appropriate lengths is straightforward. ...

7 years ago | 1

| accepted

Answered
Network based differential equations
It depends on what you mean by ‘solve’. If you simply want to integrate them, see the documentation for ode45, and consider usi...

7 years ago | 0

Answered
Reading numerical data from text file
I have no idea what you want to do. You can read the entire file into your MATLAB workspace using load, readmatrix, dlmread, ...

7 years ago | 1

| accepted

Answered
How to Import Data from another MATLAB file?
I would save it as a .mat file in the first .m file, then load it into the new .m file.

7 years ago | 1

| accepted

Load more