A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

plus de 5 ans il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

plus de 5 ans il y a

A résolu


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

plus de 5 ans il y a

A résolu


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

plus de 5 ans il y a

A résolu


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

plus de 5 ans il y a

A résolu


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

plus de 5 ans il y a

A résolu


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

plus de 5 ans il y a

A résolu


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

plus de 5 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 5 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

plus de 5 ans il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus de 5 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

plus de 5 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus de 5 ans il y a

A résolu


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

plus de 5 ans il y a

A résolu


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

plus de 5 ans il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

plus de 5 ans il y a

Réponse apportée
How to create body centered cubic structure?
You could create 2 different X/Y/Z combinations, each for corners and centre of the lattice. Then plotting them one after the ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
matconvnet in online matlab
The problem is that since 'mex' command is not yet supported in Matlab Online, you cannot compile the source code as mentioned i...

plus de 5 ans il y a | 0

Réponse apportée
How can I solve 6 different first order ODEs (Three DOF) with ODE45 in three different conditions
I'm not sure which script contains your constraints. In general, you may try writing a third script to invoke the first two from...

plus de 5 ans il y a | 0

Réponse apportée
how to build a histogram from an output with 2 vectors
Hi Heg, It seems that you haven't posted the code where the 'ga' algorithm is running and the results are obtained. In general...

plus de 5 ans il y a | 0

Réponse apportée
Making a circle with circles
Hi Nicholas, I'm assuming you want smaller circles (r=1) to be arranged in a circular shape, i.e. where they form the perimente...

plus de 5 ans il y a | 0

Réponse apportée
unable to find function / Previously accessible file
Hi Malgorzata, Instead of saving the strings to a .m code file and executing that code, I suggest using eval() to have them po...

plus de 5 ans il y a | 0

Réponse apportée
What is the logic behind timedelaynet?
I belive this page explains the basic concepts. Wikipedia Entry You may read the following research papers to get a better u...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to change dot notation to if else if structure, with while and for loops.
I'm not certain what sort of 'dot notation' is in question here. The '.' - dots in your code are multiplication operators. In M...

plus de 5 ans il y a | 0

Réponse apportée
Matlab code for PRESENT and HIGHT
You may explore MATLAB File Exchange for such implementations. File Exchange is a platform for Matlab users to publicly share ...

plus de 5 ans il y a | 0

Réponse apportée
Function calling and executing from different .m files
Hi Jay, As an alternative, you may try saving the initialized matrix to disk (typucally as a .mat file) and loading it in the s...

plus de 5 ans il y a | 0

Réponse apportée
how to calculate classification accuracy
Hi Reen, I'm not sure which method you want to use for calculating an accuracy value, but here's one approach we may try: % ou...

plus de 5 ans il y a | 0

Réponse apportée
how to generate indices for the training data for all the possible combinations in leave n out cross validation?
Hi Harshan, You may use 'cvparition' function with 'leaveout' option specified. Have a read of the doc: https://www.mathwork...

plus de 5 ans il y a | 0

Réponse apportée
Multiply a column by -1, then do something. Do this for all possible combinations of the matrix
Hey Diego, I think you can attempt this problem using logical indexing. It's often faster to group all the combinations into a ...

plus de 5 ans il y a | 0

Réponse apportée
partially reduced row echelon form
Hey Christoph, You may try using the 'fast rref' function created on File Exchange by Armin Ataei. It may perform faster than ...

plus de 5 ans il y a | 0

| A accepté

Charger plus