Solved

Area of a circle

Given the radius x, y would be the area of a circle. Pi = 3.1416

circa 3 anni ago

Solved

If you have matrix A, create matrix B using matrix A as an "element"

A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

circa 3 anni ago

Solved

Vector with a repeated entry

Create a row vector of length n, filled with 5's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

circa 3 anni ago

Solved

Is my wife really right?

For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = '...

circa 3 anni ago

Solved

Create formatted value string Cell array of a vector

This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

circa 3 anni ago

Solved

Multielement indexing of a row array

The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

circa 3 anni ago

Solved

Lightning strike distance: Writing a function

Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

circa 3 anni ago

Solved

Pizza value using expression with parentheses

Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

circa 3 anni ago

Solved

Fahrenheit to Celsius using multiple statements

Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

circa 3 anni ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

circa 3 anni ago

Solved

design a magic matrix without using the command magic.

Like magic(4) = 16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1

circa 3 anni ago

Solved

UICBioE240 problem 1.17

In the expression (2+5i), how does MATLAB read the expressions A = 2+5i B = 2+5*i C = both are okay Write capital letter a...

circa 3 anni ago

Solved

UICBioE240 problem 1.18

exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.

circa 3 anni ago

Solved

UICBioE240 2.1

This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

circa 3 anni ago

Solved

multiple of nine?

Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

circa 3 anni ago

Solved

Accessing values in a cell

You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

circa 3 anni ago

Solved

house of cards

How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

circa 3 anni ago

Solved

Number of divisors of a given number

Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

circa 3 anni ago

Solved

Juggler sequence revisited

This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

circa 3 anni ago

Solved

Return the sequence element I

Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

circa 3 anni ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

circa 3 anni ago

Solved

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

circa 3 anni ago

Solved

Nth roots of unity

First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

circa 3 anni ago