문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


radius of a spherical planet
you just measured its surface area, that is the input.

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

거의 14년 전

문제를 풀었습니다


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

거의 14년 전

문제를 풀었습니다


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

거의 14년 전

문제를 풀었습니다


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

질문


Simulink.Parameter Trouble
I have the following function function CheckA2L(Signal) %%%%%% Check to see if signal in a2l file A...

대략 14년 전 | 답변 수: 1 | 0

1

답변

질문


Cutting down on space while generating code.
I am doing some on target rapid prototyping with some pretty tight space restrictions. A new release of control software is abou...

대략 14년 전 | 답변 수: 1 | 1

1

답변

질문


s functions causing build errors
I am integrating new rapid prototyping software and everything is going fine until we try to build code that contains s-function...

대략 14년 전 | 답변 수: 1 | 0

1

답변

질문


Pausing a for loop execution
I have the following section of code: %%%%%% Loop through signals for idx = 1:length(missing_sigs) mis_sig_no_...

대략 14년 전 | 답변 수: 1 | 0

1

답변

질문


Seeing if a value is in a matrix
This is a rather simple question, but I'm sort of stumped by it. I want to write a bit of code that returns a 1 or 0 based on wh...

14년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Copying a subsystem from one model to another
I need to copy a subsystem and all of the blocks attached to the input and output ports of it to a new model for modification. T...

14년 초과 전 | 답변 수: 2 | 1

2

답변

질문


Adding a masked subsytem to a model from script.
I am writing a program that automates the building of a simulink system. However when I try the following command: add_bloc...

14년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Adding a subsystem using an m file
I am using the following code to create a simulink model via text: %% Test model for learning how to build simulink models ...

14년 초과 전 | 답변 수: 2 | 0

2

답변

질문


Delaying an enumerated signal
I have a model that is sending out signals on a certain schedule. There are several merge blocks that combine some of my signals...

14년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Inserting numbers into a vector
I have a vector similar to [-3 -2 -1 1 2 3] and I would like to add a zero in the center so the new vector would be [-3 -2 -1 0 ...

거의 15년 전 | 답변 수: 1 | 0

1

답변

질문


Adding matrices
I have an m by m by n set of matrices and I want to add all of the matrices in the n dimension so I would end up with only one m...

거의 15년 전 | 답변 수: 2 | 0

2

답변

더 보기