Solved


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

4 years ago

Solved


Pay up
You live in a world where arbitrary denominations of currency exist. You owe your friend a sum of money denoted by s. However, i...

4 years ago

Solved


Return the middle element of an NxN square matrix where N is odd
Let's say you are given an NxN square matrix where N is always going to be an odd number: x = [ 1 2 3 4 5 6 7 8 ...

4 years ago

Solved


How close to a hole
Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

4 years ago

Solved


Award medals to winners

4 years ago

Answered
Computing Equation values for its unknown variables
It seems like you have copy-pasted the expression from somewhere, and the text is not compatible. Manually write the expression...

4 years ago | 0

| accepted

Answered
Why won't Matlab plot anything?
Use break instead of return. As when you use return, any code after it won't be executed From the documentation - "Be careful...

4 years ago | 1

| accepted

Answered
Sn*= sum of integers dividable by 11, write a script program that inputs a large positive integer M, computes the smallest integer n∗such that Sn∗> M, then displays n∗and Sn∗.
You have done quite well despite your limited understanding of the question. Your code requires only a few modifications - %M=...

4 years ago | 1

Answered
choosing function in array problem
Table = [ 1 2 3 4 5; 7 8 9 11 15; 0.8 1.5 3 -3.4 2; ...

4 years ago | 0

| accepted

Answered
How to avoid adding same elements
You can use unique to get the elements without repetition (subject to sum being less than 9007199254740992, as mentioned below) ...

4 years ago | 0

| accepted

Answered
How to draw with semiology in MATLAB?
The graph is correct. The y axis values are shown in log values as you wanted them to be. And, for the last two values of Q, th...

4 years ago | 2

Answered
How to use the sum of all the iterations of a value calculated in a for-loop to calculate another value within the same loop?
Is using a loop necessary? If yes, then my comment above should work - M = [2 3]; n = [8 9]; for i = 1:2 mi(i) = M(i)*...

4 years ago | 1

Answered
Get column E based on transition in Column I
y=[1 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0]; i=find(diff(y)==-1)+1

4 years ago | 1

| accepted

Answered
Cost of Mathworks MATLAB Professional certification exam?
https://mathworks.com/training-schedule/certifications You might be eligible for the Academic discount. Check the "Academic dis...

4 years ago | 1

| accepted

Answered
Convert matrix into CSV, with each matrix element as a separate line including indices of matrix element
You can try this - y=[0.5 0.1 0.6;0.9 0.8 0.3]; z=y'; mat=[repmat(1:size(y,2),1,size(y,1))' repelem(1:size(y,1),1,size(y,2))'...

4 years ago | 1

Answered
How to extract elements of each column 1 by 1 in matrix and transform it to a column vector ?
Apologies, it took quite some time and questions to understand. Code for the 1st non-zero element in a row - M=[1 0 0...

4 years ago | 0

| accepted

Solved


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 36 3...

4 years ago

Solved


Graph Algorithms - 1 : Length of the largest closed path
An undirected simple graph is given as the form of an adjacency matrix. Find the length of the largest closed path (one that sta...

4 years ago

Solved


Homogeneous lines and points in 2D: problem 1
In high school we learn the line equation y = mx + c where m is the gradient and c is the intercept. However this form is proble...

4 years ago

Solved


Conjunctive Normal Form
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of clauses, where ...

4 years ago

Solved


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

4 years ago

Solved


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

4 years ago

Answered
How to find the projection of vectors from corrdinates?
Proceed the same way as you would on pen and paper. You can use points to define the vector - %[x-coordinate y-coordinate] p1=...

4 years ago | 0

| accepted

Solved


FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

4 years ago

Solved


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

4 years ago

Solved


Reverse Boggle
*Description* In the classic Parker Brothers game <http://en.wikipedia.org/wiki/Boggle Boggle>, players find words from a 4x4...

4 years ago

Solved


Ambiguous concatenation
Give two expressions that can have different meaning inside/outside a concatenation expression.

4 years ago

Answered
In given example, how can I find multiplication of all c matrices (c1, c2, c3, c4, c5) in a 'for' loop?
Finding c1*c2*c3*c4*c5 a=[1 2 3 4 5];c=1; for i=1:5 b=[1 2; 6 5]*a(i); c=c*b; end c

4 years ago | 0

| accepted

Solved


Scrabble Scores - 11
This problem builds on the previous problem, wherein you were provided a letter of an existing word on the board and from which ...

4 years ago

Solved


Scrabble Scores - 4
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

4 years ago

Load more