解決済み


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

10年以上 前

解決済み


prime test
find largest 2 digit prime number

10年以上 前

解決済み


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

10年以上 前

解決済み


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

10年以上 前

解決済み


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

10年以上 前

解決済み


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

10年以上 前

解決済み


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

10年以上 前

解決済み


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

10年以上 前

解決済み


factorial of a number x
Factorial of a number x

10年以上 前

解決済み


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

10年以上 前

解決済み


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

10年以上 前

解決済み


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

10年以上 前

解決済み


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

10年以上 前

解決済み


Test
Answer the question and the correct answer write in vector. Only one answer is correct. 1a Yes 1b No 1c No 1d No ...

10年以上 前

解決済み


Determine the length of a string of characters
Determine the length of a string of characters

10年以上 前

解決済み


Area of a circle
Find the value for area of the circle if diameter is given

10年以上 前

解決済み


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

10年以上 前

解決済み


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

10年以上 前

解決済み


Variable Assignment
Complete the ? part by assigning myExamScore with 100.

10年以上 前

解決済み


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

10年以上 前

解決済み


square number
Square a number

10年以上 前

解決済み


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

10年以上 前

解決済み


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

10年以上 前

解決済み


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

10年以上 前

解決済み


Array of Ones
Create a 100 X 100 array of ones.

10年以上 前

解決済み


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

さらに読み込む