解決済み


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

約8年 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

約8年 前

解決済み


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

約8年 前

解決済み


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

約8年 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

約8年 前

解決済み


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

約8年 前

解決済み


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

約8年 前

解決済み


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

約8年 前

解決済み


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

約8年 前

解決済み


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

約8年 前

解決済み


How to Concatenate two strings?
How to Concatenate two strings?

約8年 前

解決済み


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

約8年 前

解決済み


Find index of a string in a cell array
Write a function that finds the index at which the cell array of strings C contains the exact string S. So if C = {'twe...

約8年 前

解決済み


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

約8年 前

解決済み


find number of buses for given to and from lines
find number of buses for given to and from lines

約8年 前

解決済み


how to find size of a matrix?
how to find size of a matrix?

約8年 前

解決済み


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

約8年 前

解決済み


Find cosine between two given vectors u and v.
Find cosine between two given vectors u and v. Example u = [5 2 0 5 3 0]; v = [3 2 5 1 ...

約8年 前

解決済み


how to convert given text into all upper case letters?
how to convert given text into all upper case letters?

約8年 前

解決済み


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

約8年 前

解決済み


Find Euclidean norm of given vector u.
Find Euclidean norm of given vector u. https://en.wikipedia.org/wiki/Euclidean_distance Example x=[1 1] result=sqrt(1^2+1^2...

約8年 前

解決済み


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

約8年 前

解決済み


Find the sides of an isosceles triangle when given its area and height to its base.
Find the sides of an isosceles triangle when given its area and height to its base. Example S=12, h=4, result will be [5 5 6]...

約8年 前

解決済み


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

約8年 前

解決済み


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

約8年 前

解決済み


Create square matrix with given conditions.
Create square matrix which should be like given matrix M. M = [ n^2 n*(n-1) n*(n-2) ... n*2 n; n*(n-1)...

約8年 前

解決済み


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

約8年 前

解決済み


Number of elements in matrix
Calculate the # of elements for given matrix

約8年 前

解決済み


How do you make seven even?
Take away the s.

約8年 前

解決済み


Convert array of decimal numbers into hexadecimal numbers array.
Convert array of decimal numbers into hexadecimal numbers array. Example x =[ 32 33 34 35 36 37 38 ...

約8年 前

さらに読み込む