Beantwortet
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...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 1

Gelöst


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.

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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 ...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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 ...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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 ...

mehr als 6 Jahre vor

Beantwortet
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 ...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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,...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 1

Beantwortet
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...

mehr als 6 Jahre vor | 3

| akzeptiert

Gelöst


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

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Gelöst


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...

mehr als 6 Jahre vor

Mehr laden