Replacing the zero entry of a vector with its nonzero entries
Hello, Today I have another problem slightly different from my previous question, but they are of the same nature. Suppose...
meer dan 3 jaar ago | 2 answers | 0
Replacing the zero entry of a vector with the corresponding entry of another vector of the same dimension.
Hello everyone, Please I need some help about this: Suppose I have 2 vectors A=[0;2;0] and B=[3;5;7]. How can I write a co...
meer dan 3 jaar ago | 1 answer | 0
Removing for loop in computing the finite difference Jacobian
Hello friends, I am trying to remove the for loop i.e. to vectorize the following code that computes the numerical Jacobian u...
bijna 4 jaar ago | 1 answer | 0
How can I remove for loop in the following code that change the entries of a given vector?
Hello, I am trying to vectorize the following simple code if true A=[-1;3;0;-4]; B=zeros(size(A)); for i=1:4 if A...
bijna 4 jaar ago | 2 answers | 0