Resuelto


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

casi 5 años hace

Resuelto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

casi 5 años hace

Resuelto


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

casi 5 años hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

casi 5 años hace

Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

casi 5 años hace

Resuelto


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

casi 5 años hace

Resuelto


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

casi 5 años hace

Respondida
New to MATLAB so need help with following
You could first declare an array of x element knowing that you need to find value upto X(6) clc clear all close all N=6; %if...

casi 5 años hace | 1

Resuelto


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

casi 5 años hace

Resuelto


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

casi 5 años hace

Resuelto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

casi 5 años hace

Resuelto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

casi 5 años hace

Resuelto


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

casi 5 años hace

Resuelto


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

casi 5 años hace

Resuelto


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

casi 5 años hace

Resuelto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

casi 5 años hace

Resuelto


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

casi 5 años hace

Resuelto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

casi 5 años hace

Resuelto


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

casi 5 años hace

Resuelto


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

casi 5 años hace

Resuelto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

casi 5 años hace

Resuelto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

casi 5 años hace

Resuelto


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

casi 5 años hace

Resuelto


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

casi 5 años hace

Respondida
Newton's method in Matlab
You seem to have made some fudamentals errors in your code. 1. the variable 'x' cannot be used however you feel right 2. also ...

alrededor de 5 años hace | 3

| aceptada

Respondida
how to create scatter and histogram plots in the same graph?
Did you try the command hold on;

más de 5 años hace | 0

Resuelto


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

más de 5 años hace

Respondida
hi! i m trying to create a 3-d solid volume graph using viewsolid.but when i m using viewsolid or viewsolidone its showing a error that variable is not defined.viewsolid i think is a function....can anyone help me in this matter?
Just create another file with the following code in the same directory having the name viewSolid.m function viewSolid(zvar, ...

más de 5 años hace | 1

Respondida
How to solve matrix dimension must agree error in the following program.
Hi, according to what you stated in the comment there are a few mistakes i would like to points out 1. when b=1:1:a you only ...

más de 5 años hace | 0

| aceptada

Respondida
Pareto chart in matlab for N x M matrix
Did you try by converting the NxM matrix into an array having all the N*M elements and the use the pareto function? Need a bi...

más de 5 años hace | 0

Cargar más