Answered
Unable to perform assignment because the left and right sides have a different number of elements - Gauss-Seidel Method to solve for inverse matrix
For this case, it seems vec has 5x1 size. So you should you sum instead of trace. function [abserr] =errnorm(vec) vec = a...

5 years ago | 1

| accepted

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side - Jacobi method inverse calculation
Function errnorm(vec) has inconsistent size. Try the following modifications: function [abserr] =errnorm(vec) vec = abs(ve...

5 years ago | 1

| accepted

Answered
Undefined function 'abs' for input arguments of type 'cell'.
It is saying A is a cell type. In order to check it, run the following code: class(A) If this is the case, the following shoul...

5 years ago | 1

| accepted

Answered
Rewrite for loop with find function
The function find returns the indeces according to the condition. So, in order to diplay the values, you might use the following...

5 years ago | 1

Answered
Accessing data variables from another function
I did not get the final goal, but I fixed your code. F2([1,1,1 ; 2 2 2 ; 3 3 3]) function [Q,R] = F1(A) Q = 2*A R ...

5 years ago | 1

| accepted

Answered
I need a code to count how many raw in my matrix above zero?
You might use the function find (https://www.mathworks.com/help/matlab/ref/find.html). Check the following code: B = [1,-1; 2,...

5 years ago | 0

Answered
Index exceeds the number of array elements (2)
Hi Ali, Your dsolve function has 4 states variables: dx(1,1), dx(2,1), dx(3,1), and dx(4,1). Therefore you need an initial vari...

5 years ago | 1

Answered
How to define limit of quiver axis?
You could use axis function. For more information check here: https://www.mathworks.com/help/matlab/ref/axis.html See the follo...

5 years ago | 3

| accepted

Answered
Using 3x3 matrix to create 21x21 matrix
It is not clear the overlap values. I assumed the following: k33+k11 k33+k12 K33+k13 K33+k23 ..., Until the last is k33+k3...

5 years ago | 1

| accepted

Answered
Apply equation to an array of values producing a new data set
You do not need a door loop. Matlab is built to handle this kind of operation. Check the following: T = 1:1:122736; FcnT...

5 years ago | 2