Community Profile

photo

malki adil


Last seen: mehr als ein Jahr vor Aktiv seit 2021

Followers: 0   Following: 0

Statistiken

All
  • Promoter
  • Community Group Solver
  • Solver

Abzeichen anzeigen

Feeds

Anzeigen nach

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Frage


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

mehr als ein Jahr vor | 0 Antworten | 0

0

Antworten

Gelöst


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?

fast 2 Jahre vor

Gelöst


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

fast 2 Jahre vor

Gelöst


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

fast 2 Jahre vor

Gelöst


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

fast 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Frage


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

etwa 2 Jahre vor | 1 Antwort | 0

1

Antwort

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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.

mehr als 2 Jahre vor

Mehr laden