Beantwortet
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];...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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 ...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 1

| akzeptiert

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

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 1

Beantwortet
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 ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 2 Jahre vor | 1

Beantwortet
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 ...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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 [~...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Mehr laden