Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

5 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

5 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

5 years ago

Solved


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

5 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

5 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

5 years ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

5 years ago

Answered
Why do I have this error when I try to derivative a function with variable x?
Hi, here you are trying to compute numerical differentiation and thus, you need to use these commands: o = (diff(U)./di...

5 years ago | 0

| accepted

Answered
contour map for stress distribution
HI, Here is a corrected code: X =linspace(-4.5,4.5); R=linspace(-4.5,4.5) ; [X,Y] = meshgrid(X,R); Z= 3426.8/63.3+660*X*4...

5 years ago | 0

Answered
How to divide the original matrix into different matrices according to the strings
Hi, Here are some corrections made in your code: .. STR = cell(1,num); M_ORE = zeros(R1,C1,num); for j = 1 : num S...

5 years ago | 0

| accepted

Answered
DG Optimization through IEEE 14 bus bar system
Hi, Here is a Simulink model of IEEE 14 Bus System: https://www.mathworks.com/matlabcentral/fileexchange/46067-ieee-14-bus-s...

5 years ago | 0

Answered
Help - How to plot a graph with multiple colors?
Hi, Here are corrected part of your script: ... for k1 = 1:4 for k2 = 1:4 str =[ str; num2str(max(an(k1)...

5 years ago | 0

Answered
Study of oscillations and how to solve in MATLAB
Hi, Everything is working ok with Symbolic MATH. You have made a mistake in your code. Here is corrected code with one numeri...

5 years ago | 2

Answered
How I can fix the error in Custom equation
Hi, you should check your data first and have a scope of what are your data ranges along x, y, .... Here is a good discussio...

5 years ago | 1

Solved


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

5 years ago

Solved


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

5 years ago

Answered
Help to draw a graph of a function.
Hi, Here is the complete code: clc; clearvars; a=1; d0=2; v0=2; nu=sqrt(2.5); sumxx=[]; k=1000; T=linspace(0,2...

5 years ago | 0

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

5 years ago

Solved


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

5 years ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

5 years ago

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

5 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

5 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

5 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

5 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

5 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

5 years ago

Load more