Gelöst


Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,2,3]; Returns 1.

etwa 2 Monate vor

Gelöst


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


MATLAB 101: Equivalent Resistance Calculator
Calculate the equivalent resistance R_eq for n resistors connected in Series or Parallel.

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


Calculate Parallel Resistance
Three resistors connected in parallel have resistances R1, R 2, and R 3, respectively. Return the total resistance R total of ...

2 Monate vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

2 Monate vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

2 Monate vor

Gelöst


Create a vector
Create a vector from 0 to n by intervals of 2.

2 Monate vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

2 Monate vor

Gelöst


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

2 Monate vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

2 Monate vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

2 Monate vor

Gelöst


Inner product of two vectors
Find the inner product of two vectors.

2 Monate vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

2 Monate vor

Gelöst


Switch-Case-Otherwise
You should make random numbers to 10, by 3 rows and 3 columns. Cases from 1 to 3, b = true. Otherwise, b = false.

2 Monate vor

Gelöst


Estimating Monthly Electricity Cost for a Household Appliance
You recently bought an electric kettle for your kitchen, and you want to estimate how much it costs to run every month. The kett...

2 Monate vor

Gelöst


Voltage Divider Calculation
A voltage divider is a simple circuit used to obtain a reduced voltage from a higher voltage source using two resistors in serie...

2 Monate vor

Gelöst


LED Current Calculation
In an electrical circuit, the current (III) flowing through an LED is determined using Ohm’s Law: ​​ Where: I is the current ...

2 Monate vor

Gelöst


Inductor Energy Storage Calculation
The energy (EEE) stored in an inductor is given by the formula: Where: E is the energy in joules (J) L is the inductance in...

2 Monate vor

Gelöst


Calculate Charge Using Capacitance and Voltage
The charge (Q) stored in a capacitor is given by the formula:Q=C×V where: C is the capacitance (in farads) V is the voltage (...

2 Monate vor

Gelöst


Energy Stored in a Capacitor
The energy (E) stored in a capacitor is given by the formula: where: C is the capacitance (in farads) V is the voltage (in ...

2 Monate vor

Mehr laden