Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risposto
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);

quasi 12 anni fa | 0

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


kmph to mps
convert kilometer per hour to meter per second

quasi 12 anni fa

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

quasi 12 anni fa | 0

| accettato

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

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

quasi 12 anni fa | 1

| accettato

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

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

quasi 12 anni fa | 1

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

quasi 12 anni fa | 0

| accettato

Risposto
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)

quasi 12 anni fa | 0

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Carica altro