
Programming Languages:
Python, C, MATLAB, Fortran
Spoken Languages:
English
Python, C, MATLAB, Fortran
Spoken Languages:
English
Feeds
已解决
Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...
5 days 前
已解决
Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...
8 days 前
已解决
Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.
8 days 前
已解决
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...
8 days 前
已解决
Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...
8 days 前
已解决
How many digits are there?
Input(s) - any string Output(n) - number of digits within string s
8 days 前
已解决
Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...
8 days 前
已解决
Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...
8 days 前
已解决
Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.
8 days 前
已解决
Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...
8 days 前
已解决
Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.
8 days 前
已解决
Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...
8 days 前
已解决
ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...
8 days 前
已解决
Acid and water
⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...
8 days 前
已解决
Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...
8 days 前
已解决
Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...
8 days 前
已解决
Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...
9 days 前
已解决
Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...
9 days 前
已解决
Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...
9 days 前
已解决
Determine the length of a string of characters
Determine the length of a string of characters
9 days 前
已解决
Check if equal
Return true if all the elements of an nD array are equal, false otherwise.
9 days 前
已解决
No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...
9 days 前
已解决
Remove the positive integers.
Given array x (of integers), remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -...
9 days 前
已解决
Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.
10 days 前
已解决
Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...
10 days 前