Community Profile

# Sanchit Singla

##### Last seen: 4 months ago
188 total contributions since 2020

View details...

Contributions in
View by

Solved

ベクトル [1 2 3 4 5 6 7 8 9 10]　の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける（コンマはオプション）。 x = [1, 2, 3, 4] 問題：次のベクトルを出力する関数を作成せよ。...

4 months ago

Solved

Remove the Zero
Given an array n, remove all zeros

8 months ago

Solved

Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

8 months ago

Solved

Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

8 months ago

Solved

Determine the square root
Determine the square root of the value the user has entered, n.

8 months ago

Solved

Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

8 months ago

Solved

Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

8 months ago

Solved

Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

8 months ago

Solved

Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

8 months ago

Solved

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

8 months ago

Solved

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

8 months ago

Solved

Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

8 months ago

Solved

Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

8 months ago

Solved

Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

8 months ago

Solved

Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

8 months ago

Solved

Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

8 months ago

Solved

Times 3 problem
When you enter the number, it should return the number multiplied by 3

8 months ago

Solved

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

8 months ago

Solved

What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

8 months ago

Solved

Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

8 months ago

Solved

02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

8 months ago

Solved

Generate pi using logarithm
Generate pi using logarithm

8 months ago

Solved

matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

8 months ago

Solved

Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

8 months ago

Solved

CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

8 months ago

Solved

Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

9 months ago

Solved

Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

9 months ago

Solved

Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

9 months ago

Solved

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

9 months ago

Solved

Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

9 months ago