Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

8 years ago

Question


Strfind to contain complex pattern
I have created the following program to search for sentences. I want to include those that only begin with vowels. a = 'Jo...

8 years ago | 1 answer | 0

1

answer

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

8 years ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

8 years ago

Question


Problem with reading text file and making changes
I have a file in a txt format with the following data 0 584547.75 4052042.76 1 584543.25 4052030.13 2 584542.06 40520...

8 years ago | 2 answers | 0

2

answers

Question


What is wrong with the code?
I want to remove the vowels and I am doing something wrong. chr = 'The fast black dog' for i = 1:length(chr) if c...

8 years ago | 1 answer | 0

1

answer

Solved


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

8 years ago

Answered
Problem with reading text file and making changes
I have found the answer: M = dlmread('C:\Users\G\Desktop\topo.txt',' '); %replace path as appropriate M(:,1) = [] dl...

8 years ago | 0

| accepted

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

8 years ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

8 years ago

Solved


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

8 years ago

Question


What is wrong with code?
I want a matrix as follows: n = 12 b = zeros(n,n) b(1,:) = 1:n b(2,:) = 1:n.^2 etc... How can I express th...

8 years ago | 1 answer | 0

1

answer

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

8 years ago

Solved


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

8 years ago

Solved


Find the last digit
FInd the last digit of a given number. Given number is the input and output should be the last digit of that number.

8 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

8 years ago

Solved


only input
Return the output without writing any code into the function.

8 years ago

Solved


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

8 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

8 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

8 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

8 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

8 years ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

8 years ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

8 years ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

8 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

8 years ago

Question


How to sum the digits of a string?
I have created the following program to sum the digits of a number, that derives from the following expression: op = 2^n, where ...

8 years ago | 1 answer | 1

1

answer

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

8 years ago

Solved


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

8 years ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

8 years ago

Load more