A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
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);

plus de 12 ans il y a | 0

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


kmph to mps
convert kilometer per hour to meter per second

plus de 12 ans il y a

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
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.: ...

plus de 12 ans il y a | 1

| A accepté

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
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...

plus de 12 ans il y a | 1

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

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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)

plus de 12 ans il y a | 0

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Charger plus