I am currently a B.Sc engineering student studying Electrical and Electronic Engineering. I am good at problem-solving and creative tasks. I dream about being a top-level researcher in the field of applied physics. I also have a passion for theoretical physics and mathematics.

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

ungefär 2 månader ago

Solved

Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)

For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

ungefär 2 månader ago

Solved

Symmetry of vector

Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

ungefär 2 månader ago

Solved

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

ungefär 2 månader ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

ungefär 2 månader ago

Question

Having problem in using or statement in switch case

Problem: "Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. You cannot u...

10 månader ago | 1 answer | 0

Solved

How many days in a month?

Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

10 månader ago

Solved

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

10 månader ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

10 månader ago

Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

10 månader ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

10 månader ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

10 månader ago

Answered

Sorting an array in matlab

Hope it will work : A= [12,8,15,6,26]; z=numel(A); for c=1:z for k=c+1:z if A(c)<A(k) x=A(c ); A( c) =A(k); A(k)=x; e...

Sorting an array in matlab

Hope it will work : A= [12,8,15,6,26]; z=numel(A); for c=1:z for k=c+1:z if A(c)<A(k) x=A(c ); A( c) =A(k); A(k)=x; e...

10 månader ago | 0

Answered

I have a code but can't execute it. The code starts like this

this is function generator. You have to new script and then paste it there then save it now you can use "GPcore()" as a custo...

I have a code but can't execute it. The code starts like this

this is function generator. You have to new script and then paste it there then save it now you can use "GPcore()" as a custo...

10 månader ago | 0

Answered

Sorting an array in matlab

Use the following code : A=[12,8,15,6,26]; Ans = sort(A)

Sorting an array in matlab

Use the following code : A=[12,8,15,6,26]; Ans = sort(A)

10 månader ago | 0

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

10 månader ago

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

10 månader ago

Solved

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

10 månader ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

10 månader ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

10 månader ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

10 månader ago

Solved

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

10 månader ago

Solved

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

10 månader ago

Solved

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

10 månader ago

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

10 månader ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

10 månader ago