Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

13 years ago

Solved


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

13 years ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

13 years ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

13 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

13 years ago

Solved


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

13 years ago

Solved


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

13 years ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

13 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

13 years ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

13 years ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

13 years ago

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

13 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

13 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

13 years ago

Solved


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

13 years ago

Solved


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

13 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

13 years ago

Solved


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

13 years ago

Solved


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

13 years ago

Solved


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

13 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

13 years ago

Answered
GUI
I too have faced the same problem. Its a problem with Matlab GUI i guess.

13 years ago | 0

Question


Plotting continous line segments...
Hi I want to plot the movement of robotic arm which has 3 links. These links are resembled by 3 line segments which can bend...

13 years ago | 0 answers | 0

0

answers

Question


Using workspace variables in Gui
hi I want to develop simple gui consisting of only a Push button. On pressing this button i want to save all workspace variab...

14 years ago | 0 answers | 0

0

answers

Question


To save whole workspace in a file(possibly excel)
Hi how do i save the whole workspace of matlab in a file preferably in excel file. Please help. Thanks in advance.

14 years ago | 2 answers | 0

2

answers

Question


Store Scope output for different test cases in workspace
Hello I want to store a set of 4 waveform outputs from a simulink model to workspace.Also there are different test cases fo...

14 years ago | 1 answer | 0

1

answer

Question


Simulink Testing
Hello, How do I simulink model testing without using TPT tool? Is there any readymade gui available in matlab to test ...

14 years ago | 2 answers | 0

2

answers

Answered
Decimal to Hexadecimal conversion in simulink/stateflow
type in command window: >> edit dec2hex.m The function logic can be seen.. You can use the same logic to build simulink mode...

14 years ago | 0

Question


Determine vertices of a 3D model
I need to find vertices of a 3D model and store it in an array.And use this array to recontruct the 3D model. Please help...

14 years ago | 1 answer | 0

1

answer