Feeds
已解决
A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.
2 months 前
已解决
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...
2 months 前
已解决
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).
2 months 前
已解决
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 ...
2 months 前
已解决
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...
2 months 前
已解决
Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...
2 months 前
已解决
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 ...
2 months 前
已解决
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 months 前
已解决
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....
2 months 前
已解决
Force and Motion 3
Two robots push on a large object in the same direction. One robot pushes with a force of F1 Newtons and the other with a force...
2 months 前
已解决
Force and Motion 2
Two robots are pulling on an object in opposite directions. One robot pulls with a force of F1 Newtons and the other with a forc...
2 months 前
已解决
Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...
2 months 前
已解决
Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...
2 months 前
已解决
Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...
2 months 前
已解决
Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...
2 months 前
已解决
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...
2 months 前
已解决
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'...
2 months 前
已解决
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...
2 months 前
已解决
Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...
2 months 前
已解决
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
2 months 前
已解决
Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
2 months 前
已解决
Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...
2 months 前
已解决
Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...
2 months 前
已解决
Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...
2 months 前
已解决
Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...
2 months 前


