Respondida
How can I use integral function this way?
I think it will work if you simply substitute those two expressions for fi_jk and fi_is, respectively, into the anonymous functi...

alrededor de 9 años hace | 0

Respondida
i wanna generate matrix. the way fixed sum of any matrix. at the same time, will use limiting conditions
The following will give all possible sets of six integers as a six-column matrix in accordance with your three conditions. Of c...

alrededor de 9 años hace | 0

Respondida
how to generate random integer matrices on constraints?
You can make use of the algorithm given for randfixedsumint shown in: https://www.mathworks.com/matlabcentral/answers/3276...

alrededor de 9 años hace | 0

Respondida
How to compare each element of a matrix with a number?
for i1 = 1:40 s(i1) = (sum(A(i1,:).*B(:).')>=1); (<-- Corrected) end

alrededor de 9 años hace | 0

| aceptada

Respondida
How to get the integral (function) from a vector?
I wrote a function for the File Exchange which uses third order integration methods for discrete sets of points to obtain a cumu...

alrededor de 9 años hace | 0

Respondida
Easy question with probability
Also a little late, this also works: C = cumsum(P); f = X(1+sum(C(end)*rand>C));

alrededor de 9 años hace | 1

Respondida
Translate a matrix with nested loops?
No need for loops: up = 2; right = 2; B = zeros(size(A)); B(1:end-up,1+right:end) = A(1+up:end,1:end-right);

alrededor de 9 años hace | 1

| aceptada

Respondida
How can I Numerically integrate a function multiplied with a dirac delta function?
The integral of f(x) = x.^2.*dirac(x) w.r. x from -1 to +1 is zero. That is because the dirac(x) function is considered 0 at al...

alrededor de 9 años hace | 1

Respondida
covert 9.2532 decimal into binary
function s = binstr(x) if ~isfinite(x)|(length(x)~=1), error('x must be a finite scalar.'),end b = (x<0); x = abs(x);...

alrededor de 9 años hace | 0

Respondida
Solving Coupled Differential Equations
I would think it would be far more efficient to do your fitting using a general solution to your two linear differential equatio...

alrededor de 9 años hace | 0

Respondida
Solve equation with vectors as variables
If by the term “column vector” you mean a vector with one column, as is usual in matlab, then you have one unknown and as many e...

alrededor de 9 años hace | 0

Respondida
functions that give multiples
count = length([i:i:n,j:j:n]);

alrededor de 9 años hace | 0

Respondida
Determining answers from a for loop?
Whoever devised that problem has a fiendish sense of humor. It is actually calculating the minimum of each of the three columns...

alrededor de 9 años hace | 0

Respondida
Dimension mismatch error trying to build 2D array in loop
I believe you will find that the right hand side of Z0(:,n) = 30*pi./(sqrt(eps_re)).*(ellipke(k3_prime)./ellipke(k3)); ...

alrededor de 9 años hace | 0

| aceptada

Respondida
array sorting 2D
A = sortrows(sort(A,2));

alrededor de 9 años hace | 2

| aceptada

Respondida
how to find the end of major and minor axis of an ellipsoid
I think you need axis equal so that scaling is the same for both axes.

alrededor de 9 años hace | 0

Respondida
How do I implement this function in Matlab ?
1/sum(k:Y)

alrededor de 9 años hace | 0

Respondida
How to get equation of a curve plotted using( z=ax^2+by^2).
Assuming you have generated the data points accurately, you need only two data points (x1,y1,z1) and (x2,y2,z2) to retrieve your...

alrededor de 9 años hace | 0

Respondida
I need to solve two nonlinear equations simultaneously
If you have the Optimization Toolbox, you can use fsolve to find an accurate simultaneous solution for the two equations. You c...

alrededor de 9 años hace | 0

Respondida
How to find shared elements in a matrix
D = nchoosek(find(P==1),2); D = D(A(D(:,1)+n*(D(:,2)-1))==1 & A(D(:,2)+n*(D(:,1)-1))==1,:); The two elements in each row...

alrededor de 9 años hace | 0

| aceptada

Respondida
How can I fix this error?
Judging by your error message, the two arrays, ck and ECG_ac, have different sizes. That's a no-no.

alrededor de 9 años hace | 0

Respondida
A vector is given by x = [–3.5 5 –6.2 11.1 0 7 –9.5 2 15 –1 3 2.5]. Using conditional statements and loops, write a program that rearranges the elements of x in order from the smallest to the largest. Do not use MATLAB’s built-in function
Your code works like the following. At i = 1, it makes the assumption that y(i) is the smallest element of y and temporarily st...

alrededor de 9 años hace | 0

Respondida
Add elements of a vector
Your phrase “add those elements 10 out of 10” is not very specific. I give the solutions to two possible interpretations. Let ...

alrededor de 9 años hace | 0

Respondida
Generate 100 random numbers between 0 and 1 and simulate the role of a 6-sided die in MATLAB
d = ceil(6*rand(100,1));

alrededor de 9 años hace | 0

Respondida
How do I store all the outputs of a 3 for loops in a 1Dimensional vector?
Do this: pr(C+3*(M-1)+9*(F-1)) = ....

alrededor de 9 años hace | 1

| aceptada

Respondida
I multiply 3x3 and 3x1 matrix and the end result is 3x3 instead of 3x1. What's wrong with the code.?
You have used .* instead of *, which is element-by-element, so matlab automatically expands F2 as: repmat(F2,1,3) and then perfo...

alrededor de 9 años hace | 0

Respondida
Can the double-precision floating point number 0.72 be represented exactly in Matlab? Explain.
In almost all computers, floating point numbers are represented in binary format. This means that the only numbers that can be ...

alrededor de 9 años hace | 0

Respondida
Calculate the 3D angle between two vectors
The angle between two three-element vectors, P1 and P2, can be calculated using matlab in the following way: a = atan2(norm...

alrededor de 9 años hace | 2

Respondida
Help with a minimize problem
It is quite possible for functions such as yours to have more than one point of local minimum. If that is the case, the one tha...

alrededor de 9 años hace | 0

Respondida
Conditional Random number generation
function R = randfixedsumint(m,n,S); % This generates an m by n array R. Each row will sum to S, and % all elements ...

alrededor de 9 años hace | 4

| aceptada

Cargar más