Solved

Multiply a column by a row

* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

6 days ago

Solved

CONVERT TAN TO SIN

In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

6 days ago

Solved

Area of a pentagon

Given the side of a regular pentagon and its apothem return the area of pentagon. Remember the area of pentagon is calculate ...

6 days ago

Solved

Knights and Knaves (part 1)

This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

6 days ago

Solved

Implement simple rotation cypher

If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

16 days ago

Solved

Return the Fibonacci Sequence

Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

17 days ago

Solved

microseconds passed today

Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

18 days ago

Answered

Time axis as x axis

When you do plot(signal) Matlab plots the signal values for each data point. But if your x-axis do not vary in the steps of ...

Time axis as x axis

When you do plot(signal) Matlab plots the signal values for each data point. But if your x-axis do not vary in the steps of ...

23 days ago | 0

Answered

How can I import my graph as a signal to Simulink?

Lookup table is what you need. Below is a link for a video on lookup tables: https://www.youtube.com/watch?v=HmfwKoFHrO4

How can I import my graph as a signal to Simulink?

Lookup table is what you need. Below is a link for a video on lookup tables: https://www.youtube.com/watch?v=HmfwKoFHrO4

24 days ago | 1

Answered

Back-calculating a variable in equation to give a value of zero

k = 1; % outside the loop % inside the loop F(k) = ... %rest remains unchanged k = k+1;

Back-calculating a variable in equation to give a value of zero

k = 1; % outside the loop % inside the loop F(k) = ... %rest remains unchanged k = k+1;

29 days ago | 0

| accepted

Answered

V2X simulation in Matlab

Check this out : https://www.mathworks.com/matlabcentral/answers/526314-model-to-create-v2x-applications#answer_433103

V2X simulation in Matlab

Check this out : https://www.mathworks.com/matlabcentral/answers/526314-model-to-create-v2x-applications#answer_433103

29 days ago | 0

Solved

Calculate days until Christmas

Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

2 months ago

Solved

Element by element multiplication of two vectors

Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

2 months ago

Solved

Determine the square root

Determine the square root of the value the user has entered, n.

2 months ago

Solved

Replace every 3rd element in a vector with 4

x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

2 months ago

Solved

Perfect square.

Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

2 months ago

Solved

What day is it?

Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

2 months ago

Solved

Find Month & day for given day number of a year

Find Month & day for given day number of a year (day number is any number ranging from 1 to 366)

2 months ago

Solved

NCHOOSEK - Time Optimization

*Input* * *V* —— Set of all choices, a vector of N, 1 < N < 100 * *K* —— Number of selected choices, a scalar, 0 <= K <=...

2 months ago

Solved

Y=X

Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

2 months ago

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

2 months ago

Solved

Try 1.5.4: Celsius to Fahrenheit

Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

2 months ago

Solved

Increment a number, given its digits

Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

2 months ago

Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

2 months ago

Solved

Beginner's Problem - Squaring

Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

2 months ago

Solved

Back to basics 6 - Column Vector

Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

2 months ago

Solved

Find the sum of the elements in the "second" diagonal

Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

2 months ago

Solved

Back to basics 11 - Max Integer

Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

2 months ago