Mechanical Engineering, IIT Guwahati

Solved

対称で、n*2n のサイズの行列を作成しましょう

サイズが n*2n の "mirror" 行列（対称行列）を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

circa un mese ago

Answered

How to remodify matrix

You can use following commands. Let the 6x4 matrix be 'xyz'. file1 = xyz[1,:;4,:] file2 = xyz[2,:;5,:] file3 = xyz[3,:;6,:]

How to remodify matrix

You can use following commands. Let the 6x4 matrix be 'xyz'. file1 = xyz[1,:;4,:] file2 = xyz[2,:;5,:] file3 = xyz[3,:;6,:]

2 mesi ago | 1

| accepted

Answered

Explicit solution could not be found. using solve command

Instead of using '=' operator in the solve command, use '==' operator. Also, it would be better to include the whole first ter...

Explicit solution could not be found. using solve command

Instead of using '=' operator in the solve command, use '==' operator. Also, it would be better to include the whole first ter...

2 mesi ago | 0

Answered

How can delete specific values from below matrix?

To delete elements(columns here) from a matrix(distance) that don't meet a condition (distance>=50), you can do this distance(d...

How can delete specific values from below matrix?

To delete elements(columns here) from a matrix(distance) that don't meet a condition (distance>=50), you can do this distance(d...

2 mesi ago | 0

Solved

Triangle sequence

A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

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

3 mesi ago

Solved

Distance walked 3D

suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

3 mesi ago

Solved

check whether a number is a pentatope number

https://en.wikipedia.org/wiki/Pentatope_number

3 mesi ago

Solved

An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?

area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the ...

3 mesi ago

Solved

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

3 mesi ago

Solved

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

3 mesi ago

Solved

Project Euler: Problem 7, Nth prime

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

3 mesi ago

Answered

How do you crete a function file?

Write the code, for e.g. function y=plot(A) x=0:pi/A:2*pi; plot(x, sin(x)) hold on plot(x, sin(2*x)) hold off end Call t...

How do you crete a function file?

Write the code, for e.g. function y=plot(A) x=0:pi/A:2*pi; plot(x, sin(x)) hold on plot(x, sin(2*x)) hold off end Call t...

3 mesi ago | 0

| accepted

Answered

Not enough input arguments?

Make sure that your file is saved with the same name as your function if there's only one function. Also, you can try this in t...

Not enough input arguments?

Make sure that your file is saved with the same name as your function if there's only one function. Also, you can try this in t...

3 mesi ago | 0

Answered

how to calculate the partial derivatives for a given function of two variable ?

Hello, You can use diff function operator to obtain partial derivatives as follows: 1- Define a function using syms function. (...

how to calculate the partial derivatives for a given function of two variable ?

Hello, You can use diff function operator to obtain partial derivatives as follows: 1- Define a function using syms function. (...

3 mesi ago | 1

Answered

User-Defined function to add polynomials

Can you state what problem you are trying to solve?

User-Defined function to add polynomials

Can you state what problem you are trying to solve?

3 mesi ago | 0

Solved

sum of non-primes

The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

3 mesi ago

Solved

Matlab Basics II - Determine if an array has a 3rd dimension

For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

3 mesi ago

Solved

Matlab Basics II - Free Fall

An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

3 mesi ago

Solved

Matlab Basics II - Create a vector with a repeated entry

Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

3 mesi ago

Solved

Matlab Basics - Pick out parts of a vector

Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

3 mesi ago

Solved

Matlab Basics - Switching Assignments

Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

3 mesi ago

Solved

04 - Scalar Equations 3

Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

3 mesi ago

Solved

03 - Matrix Variables 2

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

3 mesi ago

Solved

05 - Vector Equations 2

Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

3 mesi ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

3 mesi ago

Solved

04 - Scalar Equations 2

Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

3 mesi ago

Solved

02 - Vector Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

3 mesi ago

Solved

"mirror" matrix

Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

3 mesi ago