Solved


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

ongeveer 3 jaar ago

Solved


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

ongeveer 3 jaar ago

Solved


modulus of a number
find the modulus of a given number

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


square of a number
find square of a given number

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


length of a vector
Find twice the length of a given vector.

ongeveer 3 jaar ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

ongeveer 3 jaar 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 ...

ongeveer 3 jaar ago

Solved


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

ongeveer 3 jaar ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

ongeveer 3 jaar ago

Solved


Given a matrix, swap the 2nd & 3rd 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...

ongeveer 3 jaar ago

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.

ongeveer 3 jaar ago

Solved


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

ongeveer 3 jaar ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

ongeveer 3 jaar ago

Solved


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

ongeveer 3 jaar ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

ongeveer 3 jaar ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

ongeveer 3 jaar ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

ongeveer 3 jaar ago

Solved


Rank of matrix
Find the rank of given matrix

ongeveer 3 jaar ago

Solved


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

ongeveer 3 jaar ago

Solved


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

ongeveer 3 jaar ago

Solved


Add two numbers
Add two numbers (For beginners)

ongeveer 3 jaar ago

Question


running for loop gives error " Row index exceeds table dimentions "
i want to extraxt specific range of data from a table names as "Raw", and finally find mean of selected data assigned to variabl...

ongeveer 3 jaar ago | 2 answers | 0

2

answers

Question


how to add a number in a variable in a multiple?
i want to generate a data from zero to 180 degree for that i write A = 0:45:180; so i will get A = 0 45 90 135 180 now i wa...

meer dan 3 jaar ago | 1 answer | 0

1

answer

Question


How to reduce precision of data greator than zero only? (Matlab R2019a)
Hello... Lets suppose i have a data stored in a variable A = [1.23323 45.24343 0.1 0.001 455.34543 ...

meer dan 3 jaar ago | 1 answer | 0

1

answer

Question


How to detect which type of data user selected 'text' or 'excel' file via "uigetfile" and then perform further code?
i have written a code that allows user to input data and give both options of "text" and "Excel"..that is [filename, pathname]...

bijna 4 jaar ago | 1 answer | 0

1

answer

Question


How to import all sheets of excel file with "UIgetfile" option?
i m writing a code that fetch a excell file including all sheets and store that data in a Variable etc. What I've managed to do ...

bijna 4 jaar ago | 1 answer | 0

1

answer

Load more