Solved

The 5th Root

Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

mer än 2 år ago

Answered

After Allocating a Large Variable and Crashing, MATLAB is Forever Slow

I have had the same problem in my R2017a (!) version. I have been inspecting the memory usage and running time of some function,...

After Allocating a Large Variable and Crashing, MATLAB is Forever Slow

I have had the same problem in my R2017a (!) version. I have been inspecting the memory usage and running time of some function,...

nästan 3 år ago | 1

Answered

How to get a Data Cursor bar

Try this: <http://www.mathworks.com/matlabcentral/fileexchange/49612-cursorbar cursorbar>.

How to get a Data Cursor bar

Try this: <http://www.mathworks.com/matlabcentral/fileexchange/49612-cursorbar cursorbar>.

ungefär 3 år ago | 0

Solved

Return a list sorted by number of consecutive occurrences

Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

mer än 3 år ago

Solved

Piecewise linear interpolation

Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

mer än 3 år ago

Solved

Create logical matrix with a specific row and column sums

Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

mer än 3 år 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...

nästan 4 år 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 ...

nästan 4 år ago

Solved

Create a row array using double colon operator

Create a row array from 9 to 1, using the double colon operator.

nästan 4 år 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...

nästan 4 år 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...

nästan 4 år ago

Solved

Circle area using pi

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

nästan 4 år ago

Solved

Knight's Tour Checker

Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

nästan 4 år ago

Solved

Produce a Fibonacci sequence

Construct a diagram that generates the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34.....up to 377 The Fibonacci sequ...

ungefär 5 år ago

Solved

Compute the step response of a DC motor

Compute the step response of a DC motor shown below <<http://blogs.mathworks.com/images/seth/cody/dc-motor.png>> The param...

ungefär 5 år ago

Solved

Model a falling body

An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

ungefär 5 år ago

Solved

Make a low pass filter

Make a first order low pass filter that will filter out the high frequency oscillations for the given input signal. The cut-off ...

ungefär 5 år ago

Solved

Model a simple pendulum

Model a simple pendulum of length 200cm with bob of mass 100g and plot the position in degrees. The pendulum starts at 30 degree...

ungefär 5 år ago

Solved

Counting pulses in a signal

Count the number of pulses that are the result of summing each pulse generator block. Pulse Generator blocks produce a recurr...

ungefär 5 år ago

Solved

Model a mass spring system

Model an ideal mass-spring system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/images/se...

ungefär 5 år ago

Solved

Add damping to a mass spring system

Model an ideal mass-spring-damper system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/im...

ungefär 5 år ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

ungefär 5 år ago

Solved

Make a half wave rectifier

Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

ungefär 5 år ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

ungefär 5 år ago

Solved

Produce a sine wave

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

ungefär 5 år ago

Solved

Add a block to a model

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

ungefär 5 år ago

Solved

Produce a cosine wave

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

ungefär 5 år ago

Solved

Connect blocks in a model

Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

ungefär 5 år ago

Solved

Generate a Parasitic Number

This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

ungefär 5 år ago

Solved

Generalised Hamming Number

Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

ungefär 5 år ago