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

environ 9 ans il y a

A résolu


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

environ 9 ans il y a

A résolu


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

environ 9 ans il y a

A résolu


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

environ 9 ans il y a

A résolu


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

environ 9 ans il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

environ 9 ans il y a

A résolu


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

environ 9 ans il y a

A résolu


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

environ 9 ans il y a

A résolu


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

environ 9 ans il y a

A résolu


UICBioE240 2.1
This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

environ 9 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 9 ans il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

environ 9 ans il y a

A résolu


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

environ 9 ans il y a

A résolu


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

environ 9 ans il y a

A résolu


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

environ 9 ans il y a

A résolu


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

environ 9 ans il y a

A résolu


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

environ 9 ans il y a

A résolu


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

environ 9 ans il y a

A résolu


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

environ 9 ans il y a

A résolu


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

environ 9 ans il y a

A résolu


square root
Find the square root (y) of an input (x).

environ 9 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

environ 9 ans il y a

A résolu


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

environ 9 ans il y a

A résolu


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

environ 9 ans il y a

A résolu


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

environ 9 ans il y a

A résolu


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

environ 9 ans il y a

A résolu


Currency conversion
A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

environ 9 ans il y a

A résolu


y equals x divided by 2
function y = x/2

environ 9 ans il y a

A résolu


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

environ 9 ans il y a

A résolu


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

environ 9 ans il y a

Charger plus