Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1.
Example:
Input
...
2ヶ月 前
解決済み
Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter).
Example
[1 2 3
4 5 6
7 8 9]
Output = ...
2ヶ月 前
解決済み
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...
2ヶ月 前
解決済み
Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, return a matrix with all elements above a...
2ヶ月 前
解決済み
Pi Estimate 2
Estimate Pi as described in the following link:
<http://www.people.virginia.edu/~teh1m/cody/Pi_estimation2.pdf>
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.