Mehedi hasan shuvo
Followers: 0 Following: 0
Rangpur Cadet College
Feeds
已解决
Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...
6 years 前
已解决
Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...
6 years 前
已解决
Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...
6 years 前
已解决
If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...
6 years 前
已解决
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...
6 years 前
已解决
Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...
6 years 前
已解决
03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...
6 years 前
已解决
Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...
6 years 前
已解决
Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
6 years 前
已解决
Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'
6 years 前
已解决
Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.
6 years 前
已解决
Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.
6 years 前
已解决
Sum of self power series
The series, 1^1,2^2,3^3,4^4,.... Find the sum of such series when x terms are given.
6 years 前
已解决
Check availability of a number in an array
An array is given A=[1 2 3 4 5 7 8 9 10]. Find whether the number n is present in given array or not. If the number n is prese...
6 years 前
已解决
Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.
6 years 前
已解决
Check if inputted variable is a string or a number
Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).
6 years 前
已解决
Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)
6 years 前
已解决
Matrix Generation from Vector Multiplication
Output the matrix generated from multiplying two vectors together
6 years 前
已解决
Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.
6 years 前
已解决
Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors
6 years 前
已解决
Calculate the CIRCUMFERENCE of circle.
Given the radius is 2, the circumference will be 12.5663.
6 years 前
已解决
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....
6 years 前
已解决
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...
6 years 前
已解决
Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...
6 years 前
已解决
02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>
6 years 前
已解决
Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]
6 years 前