Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

A résolu


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

environ 6 ans il y a

A résolu


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

environ 6 ans il y a

A résolu


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

environ 6 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

environ 6 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

environ 6 ans il y a

A résolu


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

environ 6 ans il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

environ 6 ans il y a

A résolu


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

environ 6 ans il y a

A résolu


Create a vector
Create a vector from 0 to n by intervals of 2.

environ 6 ans il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

environ 6 ans il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

environ 6 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

environ 6 ans il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

environ 6 ans il y a

A résolu


Inner product of two vectors
Find the inner product of two vectors.

environ 6 ans il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

environ 6 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

environ 6 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

environ 6 ans il y a

Réponse apportée
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 ...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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,...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 3

| A accepté

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

plus de 6 ans il y a

A résolu


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

plus de 6 ans il y a

A résolu


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

plus de 6 ans il y a

A résolu


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

plus de 6 ans il y a

A résolu


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

plus de 6 ans il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

plus de 6 ans il y a

Charger plus