Current through resistor
Three resistors (R2, R3, R4) are connected in parallel as shown in the figure. If this combination is connected in series with ...
3年弱 前
解決済み
Calculate Parallel Resistance
Three resistors connected in parallel have resistances R1, R 2, and R 3, respectively. Return the total resistance R total of ...
3年弱 前
解決済み
Resistance of a light bulb
The current through two identical light bulbs connected in series is C Amperes. The total voltage across both bulbs is V Volts....
3年弱 前
解決済み
Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...
3年弱 前
解決済み
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...
3年弱 前
解決済み
Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1.
Example:
Input x = [ 1 2 0 0 0
...
3年弱 前
解決済み
Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax:
a = zeros(1000,1000);
But when the function ends, I find that I don'...
3年弱 前
解決済み
Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...
matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix
[ 1 2 3 ;
4 5 6 ;
7 8 9 ]
the resulting 1-...
3年弱 前
解決済み
Sums of cubes and squares of sums
Given the positive integers 1:n, can you:
1. Compute twice the sum of the cubes of those numbers.
2. Subtract the square...
3年弱 前
解決済み
Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...
3年弱 前
解決済み
Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...
3年弱 前
解決済み
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...