Respondida
How to select different data points in different images in a loop?
I don't think a zeropad approach would be optimal, the main problem is that your vector can increase size every time as the same...

alrededor de 6 años hace | 0

| aceptada

Respondida
LONGEST PATH BY PRODUCT
You can take the log of your inverse matrix and use the log property: Which basically says that maximizing/minimizing the sum...

alrededor de 6 años hace | 0

| aceptada

Respondida
Having problem to change the value of extra parameters at each time step passed in ODE45 Solver
You can do it accurately only by doing partial integrations (make a loop in ode45 for the time steps) and changing the variable ...

alrededor de 6 años hace | 0

| aceptada

Respondida
How to calculte and plot this equation in matlab ,when T=(0-3000k)
T = 0:3000; X = @(T) 6.626e-34./sqrt(2*pi*9.11e-31*1.38e-23*T); figure,plot(X(T),T)

alrededor de 6 años hace | 0

| aceptada

Respondida
Legend not using correct colors
Your zeros(max_k) was a matrix, so each plot command made many plots and the legends went to the wrong place. Making it only ...

alrededor de 6 años hace | 6

| aceptada

Respondida
Numerically approximate the MLE by evaluating function
If you want to make sure -10 is not in the interval and still get equidistant points you could do something like this (it actual...

alrededor de 6 años hace | 0

| aceptada

Respondida
How to solve multivariable nonlinear optimization problem (fmincon or another optimization)
fmincon accepts a vector of variables, which means that as long as you pack all your variables in a vector x it doesn't matter i...

alrededor de 6 años hace | 0

Respondida
Index of a Column Vector
Just use brackets for the array index A = 1:7; A([1,2,6]) ans = 1 2 6

alrededor de 6 años hace | 0

Respondida
find array equal and put it in group?
This is one of the basic functionalites of the unique function, just do something like this: A = [1 0 0 0 0 0 1 0 0 1 ...

alrededor de 6 años hace | 1

| aceptada

Respondida
Create a function that interpolates matrix values
Yes, sure. Something like this should do the trick: % Your tabular function A = [1,2; 3,4]; % Your values x = 1....

alrededor de 6 años hace | 0

Respondida
Integrating a multivariate function (5 variables)
You first have to define what you want to plot it. This seems to be a function of w, so, for different w's you want to integrate...

alrededor de 6 años hace | 0

Respondida
Image processing Sum Square Diffrence
What exactly is the problem you're having? If the idea is just o find a template in the image you can probably find better resul...

alrededor de 6 años hace | 0

| aceptada

Respondida
Finite explicit method for heat differential equation
You were actually pretty close, the main problem was that in the boundary condition you was exponentiating your index, not your ...

alrededor de 6 años hace | 1

| aceptada

Respondida
Matrix Logical Indexing in If...else... construction
If you wanna check that a condition happens at least one time in an array you can use "any" elseif any(isinf(varargin{j})) || a...

alrededor de 6 años hace | 0

| aceptada

Respondida
coxphfit survival numerical issue
In your S0 variable for the 0.8 case the last non-zero value is 3.2114e-321, which is way lower than the maximum numerical accur...

alrededor de 6 años hace | 0

Respondida
How to choose a ROI of an image and make rest transparent, then save it?
To write the image I has to be either a double normalized to 1 or a uint8 with values from 0 to 255, in your case you had double...

alrededor de 6 años hace | 0

| aceptada

Respondida
Python to Matlab interfacing
Matlab can easily call python functions from the command, check this link from mathworks that explain how you can call your own ...

alrededor de 6 años hace | 0

Respondida
Graphing Confidence Intervals with upper and lower bounds
You were creating a picture for every loop iteration, and the plot function can't interpolate between points if you give them on...

alrededor de 6 años hace | 0

Respondida
Neural Network - MLP
I'm not sure why you want to shorten the code, it is already vectorize and I don't believe it can go so much less than this. Jus...

alrededor de 6 años hace | 0

Respondida
How to repeat monthly data over several years?
Matlab has a function for concatenating values in different dimensions, you could solve your problem like this: A = randn(144,1...

alrededor de 6 años hace | 0

| aceptada

Respondida
Generate normally distributed sample from data
I need to be careful to not start any discussion about how one actually define a normal distribution, but starting from the poin...

alrededor de 6 años hace | 0

| aceptada

Respondida
Where are the bugs for this ODE finite difference problem that solve using Newton Raphson method?
I didn't check exactly your FEM implementations but one thing that I quickly noticed is that the Newton-Rapson is an iteractive ...

alrededor de 6 años hace | 0

Respondida
How do I create a loop for this expression?
Those modifications fix your code. Your fogot the actually equation in the iteration and had some variables misplaced. a=input...

alrededor de 6 años hace | 0

Respondida
I'm trying to make a game and need some help
I would maybe advise you to use somehting like Unity to create your game since Matlab is more to perform numerical computations....

alrededor de 6 años hace | 0

Respondida
how to combine two image to get one image
This should do what you want: I = imread('cameraman.tif'); I2 = imresize(rgb2gray(imread('onion.png')),[size(I,1),size(I,2)])...

alrededor de 6 años hace | 0

Respondida
fill a boundary region with white colour
You can transform the contourns in a binary image, fill it and than translate it back to your original image. Here is an example...

alrededor de 6 años hace | 1

| aceptada

Respondida
how to join highlighted points by curve in 3D
For you to join those points with a radius that will gradually increase you first need to define what exactly is "gradually incr...

alrededor de 6 años hace | 1

| aceptada

Respondida
How to create a sliding window function over column vector M
You can easily implement a loop for this A = [1,2,3,4,5,6]'; % Easy vector to verify output fun = @(x)mean(x); % Your function...

alrededor de 6 años hace | 2

| aceptada

Respondida
Chaotic number, Chaotic sequence.
What do you mean by chaotic number, random? If so have a look at the functions randn for normal distributed numbers and rand for...

más de 6 años hace | 0

| aceptada

Respondida
any trick to stop fminsearch early?
Yes, there is, you can pass an output function and change the optimization state as soon as your error gets the threshold that y...

más de 6 años hace | 1

| aceptada

Cargar más