A résolu


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

environ 8 ans il y a

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

environ 8 ans il y a | 1 réponse | 0

1

réponse

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

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

environ 8 ans il y a | 2 réponses | 0

2

réponses

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

environ 8 ans il y a | 1 réponse | 0

1

réponse

A résolu


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

environ 8 ans il y a

Réponse apportée
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...

environ 8 ans il y a | 0

| A accepté

A résolu


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

environ 8 ans il y a

A résolu


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

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

environ 8 ans il y a | 1 réponse | 0

1

réponse

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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.

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

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

environ 8 ans il y a | 1 réponse | 1

1

réponse

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

Charger plus