Pregunta


Partition Domain Given Data of the Form w = f(x,y,z)
I have 4 vectors of size 1 x 15e8. The data is of the form w = f(x,y,z) I want to break the domain of x,y,z into cells or...

casi 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Finding Consecutive True Values in a Vector
I want to sum consecutive 1 values given a logical input vector. An example of input and output is below. Notice that the outp...

alrededor de 12 años hace | 4 respuestas | 0

4

respuestas

Pregunta


Why does MATLAB add the MATLABROOT\bin directory to my path?
When MATLAB installs, it always add its "bin" directory to my path. Why? Example: The end of my path has "C:\MathWorks\MAT...

alrededor de 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


How do I plot one timeseries vs another from the command line?
I have two timeseries. I want to plot them vs each other in an XY plot. Is this possible to do this like in the tstool "XY Plo...

alrededor de 12 años hace | 2 respuestas | 0

2

respuestas

Pregunta


Why does tab complete not work for user written functions that except filenames?
Why does tab complete not work for user written functions that except filenames? function testFunction(file) di...

más de 12 años hace | 2 respuestas | 0

2

respuestas

Respondida
While loop for the elements of an array
See the lines below. This will work. a=[1 1 1 1 1 1 1 10 1 1 1 1 1 1 12 1 1 1 1 3]; i = 1; enas=0; while a(i)==1 % ...

casi 13 años hace | 0

Respondida
detecting Excel files without Excel extension
I wrote a function that uses the Excel ActiveX server. It is still slow like MATLAB's xlsfinfo. However, it gains a little spe...

casi 13 años hace | 0

Pregunta


detecting Excel files without Excel extension
I need to be able to identify an Excel file without using xlsfinfo. It is a VERY slow function. Without it, my algorithm runs ...

casi 13 años hace | 3 respuestas | 1

3

respuestas

Resuelto


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

alrededor de 13 años hace

Resuelto


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

alrededor de 13 años hace

Resuelto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

alrededor de 13 años hace

Resuelto


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

alrededor de 13 años hace

Resuelto


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

alrededor de 13 años hace

Resuelto


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

alrededor de 13 años hace

Resuelto


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

alrededor de 13 años hace

Resuelto


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

alrededor de 13 años hace

Resuelto


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

alrededor de 13 años hace

Resuelto


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

alrededor de 13 años hace

Resuelto


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

alrededor de 13 años hace

Resuelto


surface of a spherical planet
you just discovered its circumference, that is the input.

alrededor de 13 años hace

Resuelto


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.

alrededor de 13 años hace

Resuelto


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

alrededor de 13 años hace

Resuelto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

alrededor de 13 años hace

Resuelto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

alrededor de 13 años hace

Resuelto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

alrededor de 13 años hace

Resuelto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

alrededor de 13 años hace

Resuelto


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

alrededor de 13 años hace

Resuelto


inner product of two vectors
inner product of two vectors

alrededor de 13 años hace

Resuelto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

alrededor de 13 años hace

Resuelto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

alrededor de 13 años hace

Cargar más