Community Profile # Sarah Todaro

Last seen: 約2ヶ月 前 2022 以来アクティブ

#### Statistics

• • • バッジを表示

#### Content Feed

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

radius of a spherical planet
You just measured its surface area, that is the input.

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

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

Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

Laws of motion 1

Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

Converts numbers into characters
Converts numbers into characters

Draw a '0' in a one matrix!

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

to the 2 all elements
to the 2 all elements

the average value of the elements
Calculate the average value of the elements in the array

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

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

Double all elements in the array
Duplicate all elements in the array

Find the max element of the array
Find the max element of the array

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

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

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

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

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

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

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

Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

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

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346