A répondu
Grouping sequence within interval
Something like this should do the trick for you V1 = [0.73 0.74 0.77 0.78 0.79 11.17 11.18 11.19 11.20 11.22 11.23];...

presque 4 ans il y a | 0

| A accepté

A répondu
How do I round off the answer for the depth to within 2mm?
If you want to round to a specific unit (m, mm, etc), you can do this by just adding an extra parameter to the round function wi...

presque 4 ans il y a | 0

| A accepté

A répondu
How do I make a scatter 3D plot move towards a line
It mostly depends of what points should move (only neighbours or all of them), but after you decide it you can calculate the clo...

presque 4 ans il y a | 0

A répondu
Particle size calculation from given image
The size for each particle is a task which is extremely hard to automatize, you will always get some error due to different ligh...

presque 4 ans il y a | 0

A répondu
Mean absolute value for ecg signal
Your code is okay with exception of the length. If you have a sampling rate of 250 Hz (or, in another way of expression, values ...

presque 4 ans il y a | 0

A répondu
How to work with Matrices that have a great difference in element size (e.g. 1 to 10e+15)?
I don't believe you're facing problems due to the difference of magnitudes, but rather because your problem may be very ill-cond...

presque 4 ans il y a | 0

| A accepté

A répondu
Nonlinear multiobjective optimization - Gamultiobj - Options
If you write your optimization problem like this: x = gamultiobj(fun,nvars) You're basically telling the optimizer that you ha...

presque 4 ans il y a | 0

A répondu
How to generate lines between a fixed point and evenly spaced points on a line
If I understood your question right you mean something like this? clc; xlim([0, 100]); ylim([0, 100]); hold on Ax=0; Ay...

presque 4 ans il y a | 1

| A accepté

A répondu
PLOTTING A SINE WAVE USING TRIGNOMETRIC FOURIER SERIES
You have an analytical waveform, so you can generate it for 4 cycles without using any fourier function. Then, if you use the ff...

presque 4 ans il y a | 0

A répondu
how to imput a matrix end outpur four arguments
The main function creation in matlab has the following form: function output = FuncName(input) output = f(input) end Input...

presque 4 ans il y a | 0

A répondu
Optimization of 4 variables by minimizing RMSE error as an objective function using fminsearch
Some points: Your rmse function is not returning any value You need to pass a function to the optimization function that takes...

environ 4 ans il y a | 0

| A accepté

A répondu
I'm getting an error in obtaining the optimal solution for a nonlinear equation
You have an error in your wolf loop. It should be like this: while ( ( ( fh > f + c*alpha0*gradx'*p ) || ( abs(gradk)'*p > cu*a...

environ 4 ans il y a | 0

| A accepté

A répondu
odeEueler Explicit Eurlers method
You had many syntax errors on your code. Here is a version with them fixed and it should work. Although a negative weighting is ...

environ 4 ans il y a | 0

| A accepté

A répondu
Filter time-variant data and reduce its length
Take a look at medfilt1 and/or movmean. They sould help you reduce the fluctuations. To reduce the data length you just index th...

environ 4 ans il y a | 0

A répondu
How to use function like `min` in symfun?(I got an error)
You can't use min or max in symbolic variables in matlab. A work around can be this one: syms x1 x2 real; xlt = symfun(1/2*(x1...

environ 4 ans il y a | 1

| A accepté

A répondu
Minimum of a function
You had some typos in your constrain function and also you don't need to create a function file for your function since you alre...

environ 4 ans il y a | 1

| A accepté

A répondu
How do I fix the array error?
Look this part as example: for t = ProjectedTime HatchVec = Hatchling - (Hatchling .* 0.675) - (Hatchling .* 0.325) + (Bre...

environ 4 ans il y a | 0

| A accepté

A répondu
how to fit a Nonlinear model with multiple input and single output by using dataset in matlab
Without your data nor any code is difficult to specifically help you. Still, a general thing you may do, if you already have the...

environ 4 ans il y a | 0

A répondu
Is there any method to plot two dimensional view of a function which depends on multi variables?
What exactly you expect to get with this? Your function dependes on three variables, so if you vary only x, the result will depe...

environ 4 ans il y a | 1

A répondu
Retrive variable out of a parfor loop
You have an error in your mont_carlo inputs, it should be [x,neigh,E,M]= monte_carlo ( N, T, iter,init ) or you should delete ...

environ 4 ans il y a | 0

| A accepté

A répondu
Predict function in KNN
Your KNN is not a single model to make predictions but rather a RegressionPartitionedModel. Which means it has all the statistic...

environ 4 ans il y a | 0

| A accepté

A répondu
Find params that minimize function
You can define it as an annonymous function and then call fminsearch to solve it: e = 5; xi = [1,2,3,4]; yi = [3,4,5,6]; si...

environ 4 ans il y a | 0

| A accepté

A répondu
How to implement mathematical functions
Considering that nu is a function of x,y,z and you described it as a 3-dimensional matrix in your code you could implement then ...

environ 4 ans il y a | 1

A répondu
Swap all the values in a vector
Yes, randperm: rng(31415) x=[ 1 2 3 4 5 6 7 8]; p = randperm(length(x)); xnew = x(p) xnew = 7 8 1 2 ...

environ 4 ans il y a | 0

A répondu
Multidimensional surface fitting to n independent variables.
You first have to define which kind of function you would like to build. lsqcurvefit can surely be used, but you first have to d...

environ 4 ans il y a | 0

A répondu
how to intergrate my acceleration vs time curve to velocity vs time curve with simpson's rule, instead of using cumtrapz?
You need to implement the simpson's rule on your own. A naive implementation would be something like that f = @(t)t.^2; N = 1...

environ 4 ans il y a | 0

A répondu
The first letter of the string value was not written
I would advise you to perform the last string into a loop, so you're sure they are going to be displayed right: n=input('Please...

environ 4 ans il y a | 0

A répondu
Finding index of a value in the matrix
This is probably the shortest you can get range=find( abs(A(:,1) - targetPhase) < 2 ); % targetPhase is the required phase [~...

environ 4 ans il y a | 0

| A accepté

A répondu
How can i plot this graph?
Making y=... substitute the whole array. Try something like this: x=0:0.5:5; y = zeros(size(x)); for idx = 1:length(x) i...

environ 4 ans il y a | 0

A répondu
Find the average difference of two adjacent frames on a set of images
Without further details it is difficult to know how exactly you would like to calculate it. A naive implementation that does exa...

environ 4 ans il y a | 0

| A accepté

Charger plus