construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.
E...
9年以上 前
解決済み
Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0".
Exa...
Duplicate a character
Duplicate a character 'n' times.
Example 1: str='a' n=5
output='aaaaa'
Example 2: str='*' n=3
output='***'
9年以上 前
解決済み
Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody.
Return a string that is the user's portion of the current search...
Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...
9年以上 前
解決済み
sum of first 'n' terms
Given n=10, find the sum of first 'n' terms
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...
9年以上 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes.
---
If you want to get a random permutation of integer...
9年以上 前
解決済み
Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...
9年以上 前
解決済み
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...