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

etwa ein Monat 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...

etwa ein Monat 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 (...

etwa ein Monat 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 ...

etwa ein Monat 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...

etwa ein Monat 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 ...

etwa ein Monat 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)

etwa ein Monat 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...

etwa ein Monat vor

Gelöst


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

etwa ein Monat vor

Gelöst


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

etwa ein Monat vor

Gelöst


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

etwa ein Monat vor

Gelöst


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

etwa ein Monat vor

Gelöst


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

etwa ein Monat vor

Gelöst


The Five Infection (Boss Level)
Given a 3x3 matrix A, replace: every value that is equal to five every value that is directly adjacent to a five with zero in...

etwa ein Monat vor

Gelöst


Fives Begone
Given any sentence as an input value 'sentence', turn all fives into the letter X and return the improved sentence. Also, turn a...

etwa ein Monat vor

Gelöst


Broken Clock
Create a function that outputs t, an inputted matrix time x, in hours and minutes (hr:min) unless the time contains a five. In t...

etwa ein Monat vor

Gelöst


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

etwa ein Monat vor

Gelöst


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

etwa ein Monat vor

Gelöst


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

etwa ein Monat vor

Gelöst


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

etwa ein Monat vor

Gelöst


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

etwa ein Monat vor

Gelöst


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

etwa ein Monat vor

Gelöst


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

etwa ein Monat vor

Gelöst


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

etwa ein Monat vor

Gelöst


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

etwa ein Monat vor

Gelöst


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

etwa ein Monat vor

Gelöst


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

etwa ein Monat vor

Gelöst


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

etwa ein Monat vor

Gelöst


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

etwa ein Monat vor

Gelöst


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to find the logical indices o...

etwa ein Monat vor

Mehr laden