Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

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

4 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

4 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

4 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4 years ago

Answered
how can we perform 6x6 matrix without values to find the inverse and determination
You can do that using the Symbolic Math Toolbox. And you can check wether you have this toolbox or not using the simple command ...

5 years ago | 0

| accepted

Answered
How to plot sine graph by using for loop?
maybe that is what you need. t= 0:0.01:2*pi; m =sin(t); t_plot = NaN(1,length(t)); m_plot = NaN(1,length(m)); u = 1; for...

5 years ago | 0

Answered
Need help plotting a function in matlab
x = -10:0.05:10; fun_x_1 = exp(-0.3*x(x<0)); fun_x_2 = sin(x(x>=0).^3)-sin(x(x>=0).^2)+1; plot(x(x<0),fun_x_1,x(x>=0),fun_x_2...

5 years ago | 0

| accepted

Answered
Enforce the norm of the addition of two vectors plus scalar
I assumed that a and b are 3 elements-vector and then solved the equation beta analytically. a = [1 2 3]; b = [2 3 4]; beta =...

5 years ago | 0

| accepted

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

5 years ago

Solved


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

5 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

5 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

5 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

5 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

5 years ago

Answered
Create symbolic variables with assumptions (syms)
Then try this one syms x assume(x,'real')

5 years ago | 0

Answered
Plot lines with different colors each iteration
I've I assumed the loop index to be ii, then you can modify the plot portion of your code to be: colorInd='ckyrb'; plot(ve...

6 years ago | 0

Submitted


Prove of Monty Hall Problem
Should I switch the door or not. Yes! Why? Run the script.

6 years ago | 1 download |