Rahul Sharma
Followers: 0 Following: 0
統計
All
Feeds
解決済み
Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...
約4年 前
解決済み
Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...
約4年 前
解決済み
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
約4年 前
回答済み
Solving Matrix Index Problem
a=randi(4,3,4) a(:,1)=0.25*a(:,1); a(:,2)=0.10*a(:,2); a(:,3)=0.05*a(:,3); a(:,4)=0.01*a(:,4); disp(a) b = max(s...
Solving Matrix Index Problem
a=randi(4,3,4) a(:,1)=0.25*a(:,1); a(:,2)=0.10*a(:,2); a(:,3)=0.05*a(:,3); a(:,4)=0.01*a(:,4); disp(a) b = max(s...
約4年 前 | 0
回答済み
Solving Matrix Index Problem
clear all clc a=randi(4,3,4) k=[0.25 0.10 0.05 0.01]; for j=1:4 for i=1:3 a(i,j)=k(j)*a(i,j) end end b=...
Solving Matrix Index Problem
clear all clc a=randi(4,3,4) k=[0.25 0.10 0.05 0.01]; for j=1:4 for i=1:3 a(i,j)=k(j)*a(i,j) end end b=...
約4年 前 | 0
解決済み
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年 前
解決済み
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年 前
解決済み
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...
約4年 前
解決済み
Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...
約4年 前
解決済み
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 ...
約4年 前
解決済み
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...
約4年 前
解決済み
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
約4年 前