문제를 풀었습니다


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

대략 2년 전

문제를 풀었습니다


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

대략 2년 전

문제를 풀었습니다


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

대략 2년 전

문제를 풀었습니다


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

대략 2년 전

답변 있음
Why did my mat file corrupt? How can I recover it?
I've found the cause. The problem was in the cluster side, not in the code side. My home directory on the GPU cluster was almost...

대략 2년 전 | 2

| 수락됨

질문


Why did my mat file corrupt? How can I recover it?
I saved a matrix variable as a mat file on a GPU cluster (Linux, MATLAB R2019, GPU: Tesla V100) and tried to load it in my local...

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

1

답변

문제를 풀었습니다


Toeplitize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

대략 2년 전

문제를 풀었습니다


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

대략 2년 전

질문


How is the 2D filter function used in this code?
In one of the cody answers (solution 712713), I found a following code: function B = hanlelize(A) F = flip(eye(111)); ...

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

1

답변

문제를 풀었습니다


Hankelize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

대략 2년 전

문제를 풀었습니다


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

대략 2년 전

문제를 풀었습니다


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

대략 2년 전

문제를 풀었습니다


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

대략 2년 전

문제를 풀었습니다


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

대략 2년 전

문제를 풀었습니다


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

대략 2년 전

문제를 풀었습니다


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

대략 2년 전

문제를 풀었습니다


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

대략 2년 전

문제를 풀었습니다


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

대략 2년 전

질문


Function findobj does not find an object (?)
I have a function to make a plot of two vectors t and y, and mark the minimum value of y as a red asterisk marker. function m ...

대략 2년 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

대략 2년 전

문제를 풀었습니다


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

대략 2년 전

문제를 풀었습니다


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

대략 2년 전

문제를 풀었습니다


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

대략 2년 전

문제를 풀었습니다


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

대략 2년 전

문제를 풀었습니다


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

대략 2년 전

문제를 풀었습니다


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

대략 2년 전

문제를 풀었습니다


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

대략 2년 전

문제를 풀었습니다


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

대략 2년 전

문제를 풀었습니다


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

대략 2년 전

답변 있음
Why do I get a wrong plot?
I contacted the author of the paper. It turned out that the equation for the diffraction OTF has a typo. The correct one is ...

대략 2년 전 | 0

| 수락됨

더 보기