Find x in provided equation!
x^2-2*x+1=0
This polynomial can be expressed by using each term's coefficients, such as
[1 -2 1].
Using the polynomial ...
約9年 前
解決済み
Make roundn function
Make roundn function using round.
x=0.55555
y=function(x,1)
y=1
y=function(x,2)
y=0.6
y=function(x,3)
...
約9年 前
解決済み
Print true if
all elements are larger than 5
a=[1 3 5 8 6];
b=[6 6 6 6 6];
function(a) should be false, and function(b) will be tru...
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
約9年 前
解決済み
Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3.
M = [1 2 3;4 5 6;7 8 9];
ou...
Was ist denn los?
Nur für deutschsprechende Leute!
Wie geht's?
...also gut, bis bald!
約9年 前
解決済み
Change string to number
Change given string to number. (hint: there is already function)
Changing from ['1234'] to [1234] is one of example
約9年 前
解決済み
The prisoner
"We want information, information, information."
"Who are you?"
Input can be a string or a number (array).
約9年 前
解決済み
Calculate some equation
Using given inputs x and z, make two outputs that are
y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2
y2 = x^z - z^x + (x/z)^2 - (z/x...
約9年 前
解決済み
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
約9年 前
解決済み
CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.
約9年 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
約9年 前
解決済み
Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15
Summation of array
Given an array, Find the sum of all of the elements in it
Examples:
Input x = [1 2 3 5; 4 5 6 7];
Output y is 33
約9年 前
解決済み
BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum.
Examp...
約9年 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
約9年 前
解決済み
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 = ...