A résolu


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

presque 10 ans il y a

A résolu


Basic commands - logarithmically spaced vector
Make a function, which will give a vector: y=[ 0.01 0.1 1 10 ... 10^x];

presque 10 ans il y a

A résolu


Basic commands - What platform are you using?
Please ask matlab waht platform are you using.

presque 10 ans il y a

A résolu


Determine Size of Matrix
Use any function that would output size of matrix

presque 10 ans il y a

A résolu


Delete useless part of data
When someone deals with big data. if the person delete useless part, calculation will be more faster than before deleting. De...

presque 10 ans il y a

A résolu


Calculate z=x^2+y^2
There are z in (x,y). x=1:10;y=1:10 [x y]=meshgrid(x,y) Calculate x^2+y^2.

presque 10 ans il y a

A résolu


Check given number is odd or even
Using input [x], check given number is odd or even if x is odd, output should be true.

presque 10 ans il y a

A résolu


Create given matrix
y = 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 ...

presque 10 ans il y a

A résolu


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

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

presque 10 ans il y a

A résolu


square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared y = x; end

presque 10 ans il y a

A résolu


Convert from integer to binary
if true % decimalToBinaryVector(x) end

presque 10 ans il y a

A résolu


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

presque 10 ans il y a

A résolu


~(*|/)
Return three quarters of n without using addition, subtraction, multiplication or division.

presque 10 ans il y a

A résolu


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

presque 10 ans il y a

A résolu


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

presque 10 ans il y a

A résolu


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

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

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

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

presque 10 ans il y a

A résolu


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

presque 10 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

presque 10 ans il y a

A résolu


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

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

presque 10 ans il y a

A résolu


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

presque 10 ans il y a

A résolu


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

presque 10 ans il y a

A résolu


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

presque 10 ans il y a

A résolu


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

presque 10 ans il y a

A résolu


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

presque 10 ans il y a

A résolu


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

presque 10 ans il y a

Charger plus