Beantwortet
can any one help me in detecting an error in matlab code please ?
The error message is telling you what is wrong. In this case the expression within the larger expression for finding g fa...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How can i create an if-function with probability p ?
if rand<=p y = 2*x; else y = 5*x; end

etwa 11 Jahre vor | 1

Beantwortet
how Can I have a stable and converged solution using fsolve?
_"when I change the initial guess my solution (Hw) changes"_ This is a feature of 'fsolve' you will have to accept, Parham. It...

etwa 11 Jahre vor | 0

Beantwortet
sum of random matrix = to zero
As was pointed out in your previous query, "sum of all anges is zero", one solution is to use 'randfixedsum' in the file exchang...

etwa 11 Jahre vor | 1

Beantwortet
Understanding accelerometers for rotational motion data
I assume your accelerometer is mounted such that it rotates along with the rotation of the rod. If so, the only significant com...

etwa 11 Jahre vor | 2

| akzeptiert

Beantwortet
For loop invalid syntax problem, very frustrating.
Put an asterisk between the 0.032 and the 't': Htheo(t)=4*(1-exp(-0.032*t))

etwa 11 Jahre vor | 2

Beantwortet
Why does integral2 function changes the array size of variable over which integration is performed?
Where you say _"While integrating the size of s and t is taken as 45x1 but sometimes it becomes 30x1"_ , you are apparently refe...

etwa 11 Jahre vor | 0

Beantwortet
Unique triples: Length of wire bent into triangle
The question is asking you to start with just a given integer, L, and find integers a, b, and c which are the lengths of a right...

etwa 11 Jahre vor | 0

Beantwortet
Solve a function in terms of a variable?
If my memory serves me correctly, that function will give rise to elliptic integrals of the first and second kinds, incomplete. ...

etwa 11 Jahre vor | 0

Beantwortet
Vectorizing/speeding up bsxfun multiplication-loop
You can try these to see which, if either, is faster than your current method: C = reshape(reshape(A(:,:,31:end),[],2221)*...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
vector multiplication and dot product
You cannot have the grouping q = [(1 2 3) (1 2 3); (1 2 3) .... for ordinary matrices, but you can do this: [1 2 3 1 2 3;1...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Exponential Function without exp() function
You have done two things incorrectly here, Karen. First, your required loop was to be unbounded and yet you placed a bound of f...

etwa 11 Jahre vor | 0

Beantwortet
Output of symoblic expression coming out incorrectly
The two expressions are identically equal for the cosine function, just as t*w and w*t are identically equal because of the comm...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Hi, I tried to solve the below equation(roots of w) in Matlab but it gave me no explicit solution. Please help to explain it.
I believe you have an eighth degree polynomial in w with only even powers, so it can be regarded as a fourth degree polynomial i...

etwa 11 Jahre vor | 0

Beantwortet
how to make a Series?
x = zeros(N,1); for n = 1:N x(n) = sum(-(sqrt(n:-1:2)-sqrt(n-1:-1:1)).*x(1:n-1))+1/(+exp(-a*n)); end

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How can I apply 'for' cycle for two arrays?
It depends on what you mean by "For each value of Jw and mu_o". If you mean for each of eight corresponding pairs of numbers fr...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
help with preallocating arrays?
myArray = zeros(1,10); for k = 1:10 myArray(k) = k+1; end or better still: myArray = 2:11;

etwa 11 Jahre vor | 1

Beantwortet
how can I use my function on 3*3 blocks?
m = M(a:a+2,b:b+2); % This is your "block" t = +any(m(:)~=0); % This is the returned value

etwa 11 Jahre vor | 0

Beantwortet
[HELP] Vector loops :'(
You have set std1 and std2 to equal values. Provided you do that, the result in 'h' is independent of the value 'c' and can be ...

etwa 11 Jahre vor | 2

| akzeptiert

Beantwortet
Iterative Loop for value convergence
Three pieces of advice: 1) Put Wrd = Wrdnew and Wfd = Wfdnew at the beginning of your while-loop and remove Wrd = Wrdt/2 and ...

etwa 11 Jahre vor | 0

Beantwortet
fsolve to find circle intersections
In case you are interested, there is a much more direct way of finding the two intersection points of two circles than using 'fs...

etwa 11 Jahre vor | 7

Beantwortet
numerical integration __ integral limits being variables
There are a number of ways you can proceed. One way is to use 'int' with a variable upper limit. See: http://www.mathwor...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Lyapunov Plotting: using 'mesh' and 'meshgrid' with matricies
To get the V you need for plot3, do this: V = sum(x.*(P*x),1); Don't do a meshgrid on e and ed for use in plot3. You we...

etwa 11 Jahre vor | 0

Beantwortet
How do I create a (n x n) matrix whose elements alternate 1 or 0?
M = toeplitz(mod(1:n,2),mod(1:n,2));

etwa 11 Jahre vor | 1

Beantwortet
How to generate a no. of permutations(lets say 100) of a particular row of a matrix(consisting of 30 coloumns) and store the generated permutation into another array row wise??
If r is the 30-element row vector being used, do this: m = 100; n = 30; [~,p] = sort(rand(m,n),2); s = reshape...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Warning: Explicit integral could not be found in matlab
You should try the 'simplify' function on 'e' before trying to integrate it. You will be surprised how much simplification is p...

etwa 11 Jahre vor | 0

Beantwortet
How to extract length along an angle that intercepts an ellipse.
You apparently have the center of your ellipse located at the coordinate origin. If [px,py] is the endpoint of one principal ax...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Need help creating an array
Do either of these two: n = 10; % <-- you choose n A = diag(-4*ones(n,1))+diag(2*ones(n-1,1),1)+diag(2*ones(n-1,1),-1)...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Fibonacci program makes matlab go busy forever
You can also compute the n-th term in the Fibonacci series with this formula: f(n) = round((((1+sqrt(5))/2)^n-((1-sqrt(5))...

etwa 11 Jahre vor | 3

Beantwortet
how to compute running correlation coefficient
By _"running correlation coefficient"_ I assume you mean you want the correlation computed for each possible length of x and y f...

etwa 11 Jahre vor | 0

Mehr laden