Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector
e.g. x = [1 2 3 4] --> output = 10
10年弱 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
10年弱 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
10年弱 前
解決済み
MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string.
For example
A='harsa';
b='harish'; result '1'
...
10年弱 前
解決済み
Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix
Grades=[98 56 34 100 88 87]
**re...
10年弱 前
解決済み
Evaluating a polynomial
Given the following polynomial and the value for x, determine y.
y = 3x^5 – x^3 + 8x – 3
Example
x = 1
y = 3 - 1 +...
10年弱 前
解決済み
What percentage?
Calculate the output c as the percentage of a on b for given a and b.
Max of a Vector
Write a function to return the max of a vector
10年弱 前
解決済み
Negative matrix
Change the sign of all elements in given matrix.
10年弱 前
解決済み
What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section.
<http://www.mathworks.de/matlab...
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年弱 前
解決済み
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...
10年弱 前
解決済み
Flipping
Write code that can reverse the vector without using any sort of loop.
Example
Given the input vector
A = [ 1 2 3 4 5...
10年弱 前
解決済み
Given area find sides
In a right angle triangle given area 'A'
one arm=x, another arm=2x
then find the value of x.
For example, area A=400 then ...
10年弱 前
解決済み
sum of first 'n' terms
Given n=10, find the sum of first 'n' terms
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...
Y=X
Given an input variable x, output a variable y that is equal in value to x.
Example:
Input x = 1
Output y is 1
Inp...
10年弱 前
解決済み
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...