Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

3 days ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

3 days ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

3 days ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...

3 days ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

3 days ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

3 days ago

Solved


Return area of square
Side of square=input=a Area=output=b

3 days ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

3 days ago

Solved


MATLAB 101: Replace Negatives with Zero
Write a MATLAB function that takes a numeric array (vector or matrix) of numbers and replaces all negative numbers with zero. Po...

3 days ago

Solved


MATLAB 101: Count the Evens
Write a MATLAB function that accepts an array of integers and returns the total count of even numbers present in the array. Note...

3 days ago

Solved


MATLAB 101: Lucas Sequence
The Lucas sequence follows the same additive rule as Fibonacci, but starts with 2 and 1. Sequence: 2, 1, 3, 4, 7, 11, 18, 29, 47...

3 days ago

Solved


MATLAB 101: Tribonacci Sequence
Each number in the Tribonacci series is the sum of the three preceding ones. Sequence: 0, 0, 1, 1, 2, 4, 7, 13, 24, 44, ... Writ...

3 days ago

Solved


MATLAB 101: Fibonacci Sequence
The Fibonacci sequence is defined by the rule that each number is the sum of the two preceding ones. Sequence: 0, 1, 1, 2, 3, 5,...

3 days ago

Solved


MATLAB 101: Conditional Product or Sum Calculator
Write a MATLAB function that accepts two integer numbers. If the product of the two numbers is less than or equal to 1000, retur...

3 days ago

Solved


MATLAB 101: Extracting Even/Odd Values
Given an array or a matrix, extract all elements that satisfy a specified parity condition ('even' or 'odd') and return them as ...

3 days ago

Solved


MATLAB 101: Extract the prime numbers
Given a list of elements, extract the prime numbers from that array.

3 days ago

Solved


MATLAB 101: Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

3 days ago

Solved


MATLAB 101: Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

3 days ago

Solved


MATLAB 101: Given a matrix X, manipulate it accordingly
Given a matrix X, 1st add a column to the matrix whose elements are the summation of each rows. Then add a row to the matrix who...

3 days ago

Solved


MATLAB 101: Unique elements of the array with unchanged sequence
An array is given. Find the unique elements of the array. [keep the sequence unchanged] For example if input x=[2 ,4 , 9 ,2 ,...

3 days ago

Solved


MATLAB 101: Zero finder
Write a function named 'zero_finder' that takes a matrix as input and returns the row index of the last zero for each for each c...

3 days ago

Solved


MATLAB 101: Highest 3 marks
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

3 days ago

Solved


MATLAB 101: Scalar-Vector Multiplication
Write a MATLAB function that takes a numeric array (vector or matrix) v and a scalar multiplier s. The function should return a ...

3 days ago

Solved


MATLAB 101: Wye to Delta Impedance Converter
n electrical network analysis, transforming a Wye (Y) configuration of impedances (Z1, Z2, Z3) into an equivalent Delta (Delta) ...

3 days ago

Solved


MATLAB 101: Delta to Wye Impedance Converter
In electrical network analysis, transforming a delta (Delta) configuration of components into a wye (Y) configuration is vital f...

3 days ago

Solved


MATLAB 101: Reverse a Vector
Write a MATLAB function that takes a 1D vector (either a row or a column vector) and returns the vector with its elements in exa...

3 days ago

Solved


MATLAB 101: Hypotenuse Calculator
Write a MATLAB function that accepts the base and height of a right-angled triangle (or arrays of bases and heights) and returns...

3 days ago

Solved


MATLAB 101: Area of a circle
Write a MATLAB function named circle_area that accepts the radius r as an input and returns the area of the circle.

3 days ago

Solved


MATLAB 101: Basic Calculator
Write a MATLAB function named basic_calculator that accepts two input numbers, A and B, and returns four distinct outputs: The ...

3 days ago

Solved


MATLAB 101: Rectangle Properties
Write a MATLAB function that accepts the length (L) and width (W) of a rectangle and returns two outputs: its area and its perim...

3 days ago

Load more