Solved

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

5 months ago

Problem

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

5 months ago | 1

Solved

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

1 year ago

Solved

0, 2, 0, -2, 0, 2, 0, -2, ...

Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

1 year ago

Solved

Rankine to Kelvin Converter

Given input R, degrees Rankine, convert into degrees Kelvin.

1 year ago

Solved

Kinetic Energy

Given mass, m, and kinetic energy, KE, find the velocity of the object.

1 year ago

Solved

Sum the rows

Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

1 year ago

Solved

Return the length of the longest word in the string.

Example: Input s='A fractal is a natural phenomenon or a mathematical set that exhibits a repeating pattern that display...

1 year ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

1 year ago

Solved

Solve the following boundary value problem

Return the sum of sum(res.y) y"+|y|=0 y(0)=a y(4)=b Tip: use bvp4c

1 year ago

Solved

Return ! if array element starts with a certain letter. Otherwise return ?

Input x=['try' 'once' 'more']; s='t' Output ans='!' Input x=['try' 'once' 'more']; s='O' Output ...

1 year ago

Solved

Check if a string starts with another string

Input s='He was so tired' q='He' Output ans = true

1 year ago

Solved

Small aircraft weight limit

Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

1 year ago

Solved

Duplicate a character

Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

1 year ago

Solved

Writing a while loop

Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

1 year ago

Solved

While loop: Summation

Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

1 year ago

Solved

Create incrementing array

Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

1 year ago

Solved

Sophie Germain prime

In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

1 year ago

Solved

Is it an Armstrong number?

An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

1 year ago

Solved

Matlab Basics - y as a function of x

write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

1 year ago

Solved

Find matrix of indices for multidimensional matrix.

Given some multidimensional matrix A. Get a matrix of the same size as A where all elements are replaced by their index along th...

1 year ago

Solved

Create cotangent function out of sine.

Please, don't use cos, tan, cot matlab functions.

1 year ago

Question

Why bvp4c not works?

I have an error in using bvp4c, my result is wrong My task is to solve 3*y"+2*y'=x y(0)=-2 y(1)=6 my matlab c...

1 year ago | 1 answer | 0