Beantwortet
How to use the Finite Difference Method to get the gradient?
That looks like an awkward way of doing it. I recommend downloading <http://www.mathworks.com/matlabcentral/fileexchange/13490 A...

fast 15 Jahre vor | 0

Beantwortet
Factorization
The Symbolic Toolbox has a really nice way of handling this: two = sym(2); factor(two^1024) ans = 2^1024

fast 15 Jahre vor | 0

Beantwortet
Implementation of Matrix Division in Matalb
I think most of MATLAB's linear algebra is based on LAPACK (see <http://www.mathworks.com/company/newsletters/news_notes/clevesc...

fast 15 Jahre vor | 0

Frage


TUTORIAL: How to format your question
A lot of questions include code that looks like this: A = []; for ii = 1:10 A = [A ii]; end This makes it difficult ...

fast 15 Jahre vor | 1 Antwort | 15

1

Antwort

Beantwortet
libsvm in MATLAB for Mac OS X
Maybe you need to install XCode, as suggested in <http://www.mathworks.com/matlabcentral/answers/389-installing-libsvm3-0-on-mac...

fast 15 Jahre vor | 0

Beantwortet
Problems with coupled ODEs in order to solve them numerical
You could reformulated it as y'(x) = -y(x) + 5 f'(x) = y(x) - 5 with the initial values y(0) = 0 and f(0) = 1. Then c...

fast 15 Jahre vor | 0

Beantwortet
lsqcurvefit help
Maybe you have all of the code in one file? The function |myfun| should be in a separate file. Or you could use an <http://www.m...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
fminsearchbnd morphs the matrix
In |fminsearchbnd|, line 83 is x0 = x0(:); This seems to be the source of the problem. This function is from the File Exchan...

fast 15 Jahre vor | 1

Beantwortet
How to plot 3D point clouds with color changes with respect to z?
The easiest thing to do would be to plot pixels using <http://www.mathworks.com/help/techdoc/ref/imagesc.html imagesc>. Or you ...

fast 15 Jahre vor | 0

Beantwortet
Why do you come to "MATLAB Answers"?
choices = 'abcefgi'; disp(choices(randperm(length(choices))))

fast 15 Jahre vor | 1

Beantwortet
Setting up a loop: Round 1
You could set up a loop like this: %Second Image z = uigetfile('*tif'); %select a file for displacement while ~isequa...

fast 15 Jahre vor | 1

| akzeptiert

Beantwortet
stream2 vertex
Each element of |XY| is a matrix containing the coordinates of one streamline in the form |[xcoords ycoords]|, where |xcoords| a...

fast 15 Jahre vor | 0

Beantwortet
Two ways of M-subfunction definition: what are discrepances?
The primary/secondary functions are much like two functions in separate files, except that the secondary functions (called <ht...

fast 15 Jahre vor | 1

| akzeptiert

Beantwortet
Higher order derivatives
There is a lot of stuff that doesn't belong there. This line dy=(f(x+h)-f(x-h))/(2*h); is a finite difference formula for th...

fast 15 Jahre vor | 0

Beantwortet
Constraining equilibrium solver to positive values (fsolve, lsqnonlin)
Suppose you started with a function |myfun(x)| that inputs a vector |x| and outputs a vector, for example: myfun = @(x) x.^2-...

fast 15 Jahre vor | 1

| akzeptiert

Beantwortet
FFT result does not jive with theory for basic sine and cosine
I don't think it is a round off error. If you run this code: n = 1000; t=linspace(0,2,n); x=sin(2*pi*t); y = fft(x); x2 = iff...

fast 15 Jahre vor | 1

Beantwortet
Integral of a function with time variables.
You've got multiple problems here. You haven't defined which variable you are integrating over. More importantly, in your proble...

fast 15 Jahre vor | 0

Beantwortet
numerical integration
This turned out to be surprisingly tricky, but here is the solution. First, define a function function fzv = integrateOverSec...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
Pattern Recognition using Matlab
See <http://www.mathworks.com/support/solutions/en/data/1-18VZT/index.html What functions are available to do pattern recognitio...

fast 15 Jahre vor | 0

Beantwortet
TUTORIAL: how to ask a question (on Answers) and get a fast answer
Don't: * Post duplicate questions. If you feel that your question has been neglected, it may be because you didn't pay att...

fast 15 Jahre vor | 7

Beantwortet
need help in making good figure using surf and meshgrid
Did you try imagesc(x,y,errormatrix) as I suggested in <http://www.mathworks.com/matlabcentral/answers/7328-3d-graph-sho...

fast 15 Jahre vor | 0

Beantwortet
"Data dimensions must agree" Error
Here is a demo that works: rgb_img = imread('ngc6543a.jpg'); imshow(rgb_img) I = .2989*rgb_img(:,:,1)... +.5870*rgb...

fast 15 Jahre vor | 1

| akzeptiert

Beantwortet
Additional output with fsolve
Based on your comments, here is another approach. Define a function function G = myGfunc(x) persistent G if nargin > 0 ...

fast 15 Jahre vor | 1

Beantwortet
Additional output with fsolve
Is the |G| you're really calculating costly to evaluate? If so, I'd suggest a different approach. Define your function as fun...

fast 15 Jahre vor | 1

| akzeptiert

Beantwortet
"Data dimensions must agree" Error
If you enter the command I = imread('rice.png'); you get a matrix. If you enter I = imread('ngc6543a.jpg'); ...

fast 15 Jahre vor | 0

Beantwortet
Combining 2 different models
I'm a little unclear on what you mean by "values". I will assume each vector |s1|, |s2|, etc., is a value, so what you need is t...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
Solving a system of linear equations getting the matrix
I'll give you a hint: if you have a problem that can be formulated |A*x = b|, where |A| is a matrix and |x,b| are vectors, then ...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
question: probplot for changing confidence interval
|probplot| doesn't have any confidence interval. If you are trying to fit your data to a probability distribution, the demo <htt...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
3d graph showing reconstruction error
If I understand your question, you have two input variables, |P| and |n|, and a result |e = e(P,n)|. So you create a grid of val...

fast 15 Jahre vor | 0

| akzeptiert

Beantwortet
[Solved] Power method, eigenvalues.
While we wait for more information, here is a vectorized version of whatever your algorithm is doing: function l = ww(A,E) ...

fast 15 Jahre vor | 0

Mehr laden