已回答
Complete example of mle custom pdf w/o anonymous pdf please. HELP!
You're entering the pdfH argument incorrectly. Try this: [phat,pci] = mle(dat,'pdf',pdfH,'start',start);

10 years 前 | 0

已回答
I want to create a 12x6 Matrix from six 12x1 eigenvectors; what's wrong with this code?
I'm not sure how you avoided getting a dimension mismatch error there. The thing you're missing is a colon: u = zeros(lengt...

10 years 前 | 0

| 已接受

已回答
How do you check if an inputed number is an array/vector or just 1 value?
You can use <http://www.mathworks.com/help/matlab/ref/size.html size> to find the number of components in each variable, e.g.: ...

10 years 前 | 1

| 已接受

已回答
For Loop using two variables
You need to use a couple of nested loops: k = 1.3806488*10^-23; %boltzman constant format shortEng for dE = linspace (-0...

10 years 前 | 1

已回答
- swapping a matrix
If I understand your latest comment, you begin by finding the unique numbers: an = unique(a,'stable').' bn = unique(b,'sta...

10 years 前 | 0

| 已接受

已回答
Create a simple while-loop.
If your goal is to find the next integer above |1.5^t|, you could do it using ceil(1.5^t)

10 years 前 | 0

已回答
- swapping a matrix
I have two theories for what you mean: b=a just makes |b| equal to |a|. Or z=b b=a a=z exchanges the two mat...

10 years 前 | 0

已回答
How to plot an elliptical surface in Matlab?
You have defined the perimeter of an ellipse, and meshgrid just turns it into a square grid. The command <http://www.mathworks.c...

10 years 前 | 0

已回答
Simulating a random sample from a matrix
Suppose |M| is your matrix. The following code will produce a matrix of random selections with one row for each selection. ...

10 years 前 | 0

已回答
Help with plotting an information grid
You should be able to do it with <http://www.mathworks.com/help/matlab/ref/pcolor.html pcolor>.

10 years 前 | 0

| 已接受

已回答
Saving matrices from workspace to textfile
Here is some code that will do that: % Convert to cell array of strings mc = arrayfun(@char,MAT_1,'UniformOutput',false); ...

10 years 前 | 0

已回答
Differentiation in 2D for Non Uniformly Distributed Data
Before using finite difference formulae, you should use <http://www.mathworks.com/help/matlab/ref/triscatteredinterp.html TriSca...

10 years 前 | 1

已回答
create sparse matrix from diagonal arrays
MATLAB supports sparse matrices, but for 3D arrays you'll need to visit the File Exchange and get <http://www.mathworks.com/matl...

10 years 前 | 0

已回答
Ensuring that a number is present in a string?
This can be solved nicely using MATLAB regular expressions. The idea is to look ahead from the start of the line to see if eac...

10 years 前 | 2

| 已接受

已回答
how to use function handle
Use <http://www.mathworks.com/help/matlab/ref/ezplot.html ezplot>.

11 years 前 | 0

已回答
Speeding up IF-FOR loop
One thing you could do to speed things up is to pre-allocate DoseCubeU using a command like DoseCubeU = zeros(iNX,iNY,iNZ);...

11 years 前 | 0

已回答
Custom colormaps and color bars
With the command clrmap = colormap(...) you only define the variable |clrmap|, not set the colormap. Here is a simple ex...

11 years 前 | 1

已回答
How do I concentrate my interpolation coloring around specific data ranges?
The simplest solution would be to change the mapping of data values to the colormap using <http://www.mathworks.com/help/matlab/...

11 years 前 | 0

| 已接受

已回答
I want use Simpson numerical integration method
If you want your integral to be a function of all the parameters, you could define the following: function y = fintegral(k,...

11 years 前 | 0

| 已接受

已回答
I want to initialize class variables through array type class object using a function
The main problem is that in the command Initialize( n,i,noOfNodes); the output isn't assigned to |n|. You need n = ...

11 years 前 | 0

已回答
How to integrate an array properly in matlab
Assuming you are trying to integrate over |theta|, a good approach is to create a function for your integrand like this: fu...

11 years 前 | 0

| 已接受

已回答
value classes - do you use them? I must be doing something wrong...
I have no idea what your method |double| does or what your class constructor does with the input, so I'll create a trivial examp...

11 years 前 | 0

已回答
Subplot titiles in one command
You could just have the title command inside the inner loop. Suppose you have some sort of function |yourTitleHere(i,j)| for cre...

11 years 前 | 1

已回答
Interpolating / Fitting to 3D Data
Have a look at <http://www.mathworks.com/help/matlab/ref/triscatteredinterp.html TriScatteredInterp>.

11 years 前 | 0

已回答
non linear minimization
The simplest approach would be to invert the equation to get Q = ((T-T0).*k +(H.*z.^2))./z; This will give you three est...

12 years 前 | 0

已回答
t Copula Fit
That's just a consequence of the small sample size, and consistent with the 95% confidence estimate ( |nuci| ) you get for |nuha...

12 years 前 | 0

已回答
fortran 128 bit precision
The default numerical type is |double|, which has 53 bit precision (the other 11 bits being for exponents and sign). If you have...

12 years 前 | 0

已回答
Troubleshooting tips
I tried it, and it doesn't complain if you provide values for all the constants and make sure that |V| has two elements, for exa...

12 years 前 | 0

| 已接受

已回答
Overriding "get"-able properties.
The problem occurs because you have to redefine the property |foo| in addition to the method |get.foo|. In <http://www.mathworks...

12 years 前 | 0

已回答
Writing a Matlab function for the first time
I think what you are trying to do is convert a row vector into a matrix with |total_sets| number of rows. You can do this with t...

12 years 前 | 0

| 已接受

加载更多