Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

12 years ago

Solved


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

12 years ago

Solved


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

12 years ago

Answered
Complete example of mle custom pdf w/o anonymous pdf please. HELP!
You're entering the pdfH argument incorrectly. Try this: [phat,pci] = mle(dat,'pdf',pdfH,'start',start);

12 years ago | 0

Solved


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

12 years ago

Solved


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

12 years ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

12 years ago

Solved


only input
Return the output without writing any code into the function.

12 years ago

Solved


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

12 years ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

12 years ago

Solved


Least common multiple of many numbers
1:6 -> 60

12 years ago

Solved


kmph to mps
convert kilometer per hour to meter per second

12 years ago

Answered
I want to create a 12x6 Matrix from six 12x1 eigenvectors; what's wrong with this code?
I'm not sure how you avoided getting a dimension mismatch error there. The thing you're missing is a colon: u = zeros(lengt...

12 years ago | 0

| accepted

Solved


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

12 years ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

12 years ago

Answered
How do you check if an inputed number is an array/vector or just 1 value?
You can use <http://www.mathworks.com/help/matlab/ref/size.html size> to find the number of components in each variable, e.g.: ...

12 years ago | 1

| accepted

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

12 years ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

12 years ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

12 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

12 years ago

Answered
For Loop using two variables
You need to use a couple of nested loops: k = 1.3806488*10^-23; %boltzman constant format shortEng for dE = linspace (-0...

12 years ago | 1

Answered
- swapping a matrix
If I understand your latest comment, you begin by finding the unique numbers: an = unique(a,'stable').' bn = unique(b,'sta...

12 years ago | 0

| accepted

Answered
Create a simple while-loop.
If your goal is to find the next integer above |1.5^t|, you could do it using ceil(1.5^t)

12 years ago | 0

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

12 years ago

Solved


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

12 years ago

Solved


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

12 years ago

Solved


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

12 years ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

12 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

12 years ago

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

12 years ago

Load more