Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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.

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

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

mehr als 13 Jahre vor | 0

Frage


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

mehr als 13 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

fast 14 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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.

etwa 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

etwa 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 14 Jahre vor | 2 Antworten | 0

2

Antworten

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

mehr als 14 Jahre vor | 0

Frage


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

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort