已回答
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...

4 years 前 | 0

| 已接受

已回答
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...

4 years 前 | 0

| 已接受

已回答
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 ...

4 years 前 | 0

| 已接受

已回答
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)

4 years 前 | 0

| 已接受

已回答
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 ...

4 years 前 | 6

| 已接受

已回答
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...

4 years 前 | 0

| 已接受

已回答
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...

4 years 前 | 0

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

4 years 前 | 0

已回答
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 ...

4 years 前 | 1

| 已接受

已回答
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....

4 years 前 | 0

已回答
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...

4 years 前 | 0

已回答
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...

4 years 前 | 0

| 已接受

已回答
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 ...

4 years 前 | 1

| 已接受

已回答
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...

4 years 前 | 0

| 已接受

已回答
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...

4 years 前 | 0

已回答
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...

4 years 前 | 0

| 已接受

已回答
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 ...

4 years 前 | 0

已回答
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...

4 years 前 | 0

已回答
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...

4 years 前 | 0

已回答
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...

4 years 前 | 0

| 已接受

已回答
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...

4 years 前 | 0

| 已接受

已回答
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 ...

5 years 前 | 0

已回答
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...

5 years 前 | 0

已回答
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....

5 years 前 | 0

已回答
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)])...

5 years 前 | 0

已回答
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...

5 years 前 | 1

| 已接受

已回答
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...

5 years 前 | 1

| 已接受

已回答
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...

5 years 前 | 2

| 已接受

已回答
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...

5 years 前 | 0

| 已接受

已回答
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...

5 years 前 | 1

| 已接受

加载更多