Gelöst


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

3 Tage vor

Gelöst


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

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

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

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

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

3 Tage 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 (...

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

3 Tage vor

Gelöst


Calculate Current in a Series Circuit Using KVL
Kirchhoff's Voltage Law (KVL) states that the sum of voltages around a closed loop is zero. Given a voltage source (V) and three...

3 Tage vor

Gelöst


Calculating the Total Resistance in a Series Circuit
Description: In a series circuit, the total resistance is the sum of the individual resistances. This problem asks you to write ...

3 Tage vor

Gelöst


Simple Electrical Power Calculation
Calculate the electrical power using the formula: P=V×I where: V is the voltage (in volts) I is the current (in amperes)

3 Tage vor

Gelöst


Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I​ where: V is the voltage (in volts) I is the current (in ampere...

3 Tage vor

Gelöst


love is an n-letter word
Given a list of *N words*, return the *N-letter word* (choosing one letter from each word) with the property of having the least...

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

3 Tage vor

Gelöst


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

3 Tage vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

3 Tage vor

Gelöst


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

3 Tage vor

Gelöst


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

3 Tage vor

Gelöst


calculate the length of matrix
input 1 array, calculate the length

3 Tage vor

Gelöst


Draw a '0' in a one matrix!

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

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

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


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

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

10 Tage vor

Gelöst


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...

10 Tage vor

Gelöst


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

10 Tage vor

Gelöst


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

10 Tage vor

Mehr laden