Solved


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

meer dan 7 jaar ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

meer dan 7 jaar ago

Solved


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

meer dan 7 jaar ago

Solved


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

meer dan 7 jaar ago

Solved


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

meer dan 7 jaar ago

Solved


create a circulant matrix
create a circulant matrix

meer dan 7 jaar ago

Solved


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

meer dan 7 jaar ago

Solved


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

meer dan 7 jaar ago

Solved


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

meer dan 7 jaar ago

Solved


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

meer dan 7 jaar ago

Solved


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

meer dan 7 jaar ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

meer dan 7 jaar ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

meer dan 7 jaar ago

Solved


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

meer dan 7 jaar ago

Solved


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

meer dan 7 jaar ago

Solved


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

meer dan 7 jaar ago

Solved


Modify an array's elements
Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

meer dan 7 jaar ago

Solved


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

meer dan 7 jaar ago

Solved


Times 3 problem
When you enter the number, it should return the number multiplied by 3

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

meer dan 7 jaar ago

Solved


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

meer dan 7 jaar ago

Solved


Writing a nested function: BMI calculation
Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...

meer dan 7 jaar ago

Solved


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

meer dan 7 jaar ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more ...

meer dan 7 jaar ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

meer dan 7 jaar ago

Solved


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

meer dan 7 jaar ago

Load more