Answered
How do i know the limits for maxfunevals and tolx?
You can set them to be whatever you like (within limits). If you want to know the default values, use an optimoptions (link) ca...

7 years ago | 1

Answered
Finding closest point to known coordinates
The minimum distance of a set of points is the Centroid (link), defined as the mean of the coordinates of the points: xy = [1 ...

7 years ago | 0

| accepted

Answered
How to sum data points within contour lines/isolines?
You can certainly get the (x,y) coordinates of the contours, although it takes a bit of code the get the result you likely want....

7 years ago | 0

Answered
Scattering 3D points (x y z) on a 2D plot (x y)
Use the scatter3 (link) function, and the view (link) function, specifically: view(0, 90)

7 years ago | 0

| accepted

Answered
Creating function for baseline correction
If you want to understand how to write MATLAB functions, see: Function Basics (link).

7 years ago | 1

| accepted

Answered
anyway to compare date in Matlab
It might be easier to use the datenum field instead if you simply want to compare dates: filenames1=dir'(D:/test/); time_file...

7 years ago | 0

| accepted

Answered
plotting an N segments circle
WHY? Because you are plotting a decagon rather than a circle. If you want them to be on the line, you need to reduce their rad...

7 years ago | 1

| accepted

Answered
Inputting a certain number of data points between two values
x = linspace(0, pi, 10);

7 years ago | 5

| accepted

Answered
Error using < Matrix dimensions must agree.
You apparently have R2016a or earlier, so you do not have ‘automatic implicit expansion’ that was part of R2016b and later versi...

7 years ago | 0

| accepted

Answered
How do I name the trendline in the legend? Also, how can I get the trend line equation on the plot?
It is not possible to run an image of your code. Try this: Voltage = linspace(10.45, -1.4, 8); GaugePressure = linspace(33...

7 years ago | 0

Answered
Resampling a matrix of data to increase data sample rate
Use the Signal Processing Toolbox resample (link) function. It is specifically designed for signal resampling, and includes an ...

7 years ago | 0

| accepted

Answered
What is the meaning of dividing two vectors without dot
See the documentation section on Array vs. Matrix Operations (link).

7 years ago | 0

Answered
How to draw and connect three points
Try this: V1 = randi(9, 1, 2); % Vector #1 V2 = randi(9, 1, 2); ...

7 years ago | 0

Answered
Is it possible to simplify symbolic expressions with known relations
I assume (link) it would! syms x1 x2 assume(x1*x2 == 1) a = x1*x2 + x1*x2; b = 2*a producing: b = 4*x1*x2

7 years ago | 1

| accepted

Answered
Nested For Loop Help
If you only want plots for the three ‘i’ indices, I would remove the scatter calls from the innermost loop, change them to plot ...

7 years ago | 0

| accepted

Answered
Plot multiple y-value on a single x-value
Try this: year = [2000 2001 2005 2008]; xx = {[5 10 20]; [40 60]; [30 20 10 50]; 1}; figure hold all for k1 = 1:numel(ye...

7 years ago | 0

| accepted

Answered
3D Modeling MatLab Project
You need to define the number of your 'XTick' values to be the same as the number of labels you want to display. Try these li...

7 years ago | 0

| accepted

Answered
Perfect circle instances in matlab
Try this: a = linspace(0, 2*pi, 59); x = cos(a); y = sin(a); figure plot(x, y, 'ok', 'MarkerFaceColor','k') axis equal ...

7 years ago | 0

| accepted

Answered
Plot from two curves
Use the hold (link) function: figure plot(A) hold on plot(B) hold off if your ‘points’ are (x,y) pairs, an alternative i...

7 years ago | 0

Answered
How can I use the output function of the nonlinear regression model?
There are several ways. Probably the easiest in the context of what you are doing is to use the procedure defined in: Predict o...

7 years ago | 0

| accepted

Answered
plotting on curve given only x value in a loop
See: numerical integration and solving for limit.

7 years ago | 0

| accepted

Answered
Adding variable values into legend
There are several ways to do that. One is: figure plot((1:100), rand(1, 100).*sin(1:100)) gravity = 10; gravstr = sprint...

7 years ago | 4

| accepted

Answered
Undefined variable t error
Try this: function [ f ] = dXdT(t,x) e = x(1); cc = x(2); ac = x(3); cb = x(4); g = x(5); t = [0 100]; kc1 = 36; %...

7 years ago | 0

| accepted

Answered
Linear Simulation Tool Problem
This works for me: t = 0:0.1:10; u = ones(size(B,2),1)*sin(t); y = lsim(G, u', t); figure plot(t, u, '--') hold on p...

7 years ago | 1

| accepted

Answered
Converting time format from hh mm ss to minutes or seconds
Try this: Tv = datetime(0.4532343954, 'Format','HH:mm:SS', 'ConvertFrom','excel') Tv = datetime 10:52:45

7 years ago | 0

| accepted

Answered
can you please help in how to calculate area of each loop in hysteria graph separately using Matlab
I managed to identify the beginning and ending indices for each complete loop (at least as I define them) as the ‘comzx’ vector,...

7 years ago | 0

| accepted

Answered
Plotting even and odd extensions of a function
I am not certain what you mean by ‘extensions’. Fourier series are comprised of cosine functions (real coefficients) that are...

7 years ago | 0

Answered
How to sum a row of variables during a loop
See if this does what you want: matrix = randi([0 1], 100, 2); % Create ‘matrix’ multiplier1...

7 years ago | 1

| accepted

Answered
a cell of double heading
Yes. Use Tables (link).

7 years ago | 0

| accepted

Answered
For loop with decimal number matrix
I am not certain what you want to do. If you want to use ‘i’ as a subscript, it must consist only of integers greater than 0....

7 years ago | 1

| accepted

Load more