A résolu


Calculate polynomial equation
Calculate this equation using given x 1+x+x^2+x^3+....x^99 (hint: use polyval)

environ 10 ans il y a

A résolu


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

environ 10 ans il y a

A résolu


Basic commands - Left division matrix
Please write a function which will left division of A,B Pay attention this is right division: A/B

environ 10 ans il y a

A résolu


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

environ 10 ans il y a

A résolu


Slope of the line passing through the point [x1 y1] and [x2 y2]
Determin the slope of Line passing through the points a=[x1 y1] and b=[x2 y2]

environ 10 ans il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

environ 10 ans il y a

A résolu


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

environ 10 ans il y a

A résolu


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

environ 10 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

environ 10 ans il y a

A résolu


Calculate some equation
Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

environ 10 ans il y a

A résolu


Make random permutation
Make random permutation that consist of random number from 1 to n.

environ 10 ans il y a

A résolu


Delete x value in given vector y.
Delete x value in given vector y. Exapmle x=5; y=[ 1 2 5 6 74 5 2 5] result=[1 2 6 74 2]

environ 10 ans il y a

A résolu


Calculate numerical integration.
x=0:0.01:1 y=x.^2 Calculate area from x=0 to x=1, and y=0 to y=x^2 using numerical integration. (hint: trapz)

environ 10 ans il y a

A résolu


list of prime numbers
n is given find the largest prime number <=n

environ 10 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

environ 10 ans il y a

A résolu


Find remainder when x is divided by 3
Find remainder when x is divided by 3

environ 10 ans il y a

A résolu


find the Area of a rectangle
length is x width is y what is the area of the rectangle?

environ 10 ans il y a

A résolu


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0.

environ 10 ans il y a

A résolu


Print true if (2)
There are 0. a=[1 2 3 4 0]; b=[1 1 1 1 1]; function(a) is true, and function(b) is false.

environ 10 ans il y a

A résolu


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area.

environ 10 ans il y a

A résolu


Set number x for diagonal of square matrix, which size is n.
Set number x for diagonal of square matrix, other values should be equlal 0, which size is n. Example n=2, x=4: [4 0; 0 4]

environ 10 ans il y a

A résolu


product of given two numbers?
product of given two numbers?

environ 10 ans il y a

A résolu


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

environ 10 ans il y a

A résolu


Calculate circle's property
[A R]=function(r) r is radius, A is area of circles, R is circumference.

environ 10 ans il y a

A résolu


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

environ 10 ans il y a

A résolu


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

environ 10 ans il y a

A résolu


Select primes from the matrix.
Select primes from the matrix.

environ 10 ans il y a

A résolu


Adding each element
Add the each element of the matrix.

environ 10 ans il y a

A résolu


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

environ 10 ans il y a

A résolu


Solve the system of linear equations
4x - 2y +6z=8 2x + 8y +2z=4 6x + 10y +3z=0 Find x,y,z. Output should be a=[x;y;z].

environ 10 ans il y a

Charger plus