Community Profile

photo

malki adil


Last seen: meer dan een jaar ago Active since 2021

Followers: 0   Following: 0

Statistics

All
  • Promoter
  • Community Group Solver
  • Solver

View badges

Feeds

View by

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

meer dan een jaar ago

Solved


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

meer dan een jaar ago

Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

meer dan een jaar ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

meer dan een jaar ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

meer dan een jaar ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

meer dan een jaar ago

Question


Write a function max_sum that takes v a row vector of numbers & n,a positive integer as inputs.The function needs to find n consecutive elements of v whose sum is largest poss
I write this code for the qst in desciption function [summa,index] = max_sum(v,n) l=length(v); if n>length(v) summa =0...

meer dan een jaar ago | 0 answers | 0

0

answers

Solved


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

bijna 2 jaar ago

Solved


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

bijna 2 jaar ago

Solved


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

bijna 2 jaar ago

Solved


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

bijna 2 jaar ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

ongeveer 2 jaar ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

ongeveer 2 jaar ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

ongeveer 2 jaar ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

ongeveer 2 jaar ago

Solved


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

ongeveer 2 jaar ago

Question


name value pairs with variable input arguments
function db = name_value_pairs(varargin) n=length(varargin); db ={}; if mod(n,2)~=0 || n ==0 db= {}; elseif ~ischar(var...

ongeveer 2 jaar ago | 1 answer | 0

1

answer

Solved


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

ongeveer 2 jaar ago

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

ongeveer 2 jaar ago

Solved


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

meer dan 2 jaar ago

Solved


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

meer dan 2 jaar ago

Solved


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

meer dan 2 jaar ago

Solved


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...

meer dan 2 jaar ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

meer dan 2 jaar ago

Solved


Find max
Find the maximum value of a given vector or matrix.

meer dan 2 jaar ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

meer dan 2 jaar ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

meer dan 2 jaar ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

meer dan 2 jaar ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

meer dan 2 jaar ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

meer dan 2 jaar ago

Load more