Negative Infinity
Round the given array a towards negative infinity.
7年弱 前
解決済み
Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9]
Replace the 2nd row with 8s
**remember to create matrix G
7年弱 前
解決済み
find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R)
for example I=5,h=4 then the ans R=3;
7年弱 前
解決済み
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10.
For example, if you add the di...
7年弱 前
解決済み
Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody.
Return the number of punctuation characters in the input variabl...
7年弱 前
解決済み
Find the nearest integer
Given a vector of integers and a real number find the closest integer.
EX:
>> a = [2 4 5 6 8 10];
>> b = 4.6;
>> nea...
Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0
7年弱 前
解決済み
Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by:
x = 1/2 gt^2
write a function that calculat...
7年弱 前
解決済み
How many Integers?
Count the integers in a given vector |v|.
You *must* use a loop to count each element separately.
Examples:
Input: v...
Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts
example:
a = 1, b = 2
output = 1 1.25 ...
7年弱 前
解決済み
Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to get the <http://www.ma...
7年弱 前
解決済み
Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
7年弱 前
解決済み
Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...
7年弱 前
解決済み
Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners
Points = [x, y];
Triangle = [x1, y1; x...
Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...
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'
...