문제를 풀었습니다


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

9년 초과 전

문제를 풀었습니다


convert matrix to single column
given any matrix, convert it to single column

9년 초과 전

문제를 풀었습니다


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

9년 초과 전

문제를 풀었습니다


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

9년 초과 전

문제를 풀었습니다


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

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년 초과 전

문제를 풀었습니다


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

9년 초과 전

문제를 풀었습니다


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

9년 초과 전

질문


M2014b+ graphics, changing legend orientation ex post
Under new Matlab graphics, changing the legend orientation does not work well if the legend was created with all 4 output argume...

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

1

답변

문제를 풀었습니다


Find the sum of the negative elements under the main diagonal.
Example Input A=[1 2; -3 0] Output -3

9년 초과 전

문제를 풀었습니다


Find Euclidean norm of given vector u.
Find Euclidean norm of given vector u. https://en.wikipedia.org/wiki/Euclidean_distance Example x=[1 1] result=sqrt(1^2+1^2...

9년 초과 전

문제를 풀었습니다


Numerate input arguments
For every input, output the number. Example: [a, b] = Test('first', 'second') a=1; b=2;

9년 초과 전

문제를 풀었습니다


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

9년 초과 전

문제를 풀었습니다


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

9년 초과 전

문제를 풀었습니다


Calculate circle's property
[A R]=function(r) r is radius, A is area of circles, R is circumference. A=pi*r^2 R=2*pi*r

9년 초과 전

문제를 풀었습니다


Calculate inverse matrix in m by n matrix
x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

9년 초과 전

문제를 풀었습니다


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

9년 초과 전

문제를 풀었습니다


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

9년 초과 전

문제를 풀었습니다


Conduct inner product using given matrix
a=[1 2 3]; b=[3 4 5]; y=function(a,b) Output y should be 26

9년 초과 전

문제를 풀었습니다


Make random permutation
Make random permutation that consist of random number from 1 to n.

9년 초과 전

문제를 풀었습니다


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

9년 초과 전

문제를 풀었습니다


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

9년 초과 전

문제를 풀었습니다


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

9년 초과 전

문제를 풀었습니다


Zero padding
Create y = {'01';'02';'03';'04';'05';'06';'07';'08';'09';'10'} from x = 1:10

9년 초과 전

문제


Zero padding
Create y = {'01';'02';'03';'04';'05';'06';'07';'08';'09';'10'} from x = 1:10

9년 초과 전 | 1 | 솔버 수: 30

문제를 풀었습니다


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

9년 초과 전

문제


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

9년 초과 전 | 1 | 솔버 수: 96

문제


Namespace
Create a set of n variable names 'a_1',...,'a_n' The result should be a column oriented cell array of strings. Example inp...

9년 초과 전 | 1 | 솔버 수: 31

문제를 풀었습니다


Send vector into a struct object
Construct a struct object that contains n fields named a1, a2, ..., an, and has values from a given input vector of length n.

9년 초과 전

문제를 풀었습니다


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

9년 초과 전

더 보기