Resuelto


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

alrededor de 5 años hace

Resuelto


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

alrededor de 5 años hace

Resuelto


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

alrededor de 5 años hace

Resuelto


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

alrededor de 5 años hace

Resuelto


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

alrededor de 5 años hace

Resuelto


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

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

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

alrededor de 5 años hace

Resuelto


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

alrededor de 5 años hace

Resuelto


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

alrededor de 5 años hace

Resuelto


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

alrededor de 5 años hace

Resuelto


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

alrededor de 5 años hace

Resuelto


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

alrededor de 5 años hace

Resuelto


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

alrededor de 5 años hace

Resuelto


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

alrededor de 5 años hace

Resuelto


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

alrededor de 5 años hace

Resuelto


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

alrededor de 5 años hace

Resuelto


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

alrededor de 5 años hace

Resuelto


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

alrededor de 5 años hace

Resuelto


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

alrededor de 5 años hace

Resuelto


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

alrededor de 5 años hace

Respondida
How to use a default color in a graph?
histogram(X, 'FaceColor', [0 0.4470 0.7410]);

alrededor de 5 años hace | 0

| aceptada

Respondida
Extract first x characters in specific table column and place them in new column.
data = table(["aaaaaa"; "bbbbbbb"; "ccccccc"], [2.99; 2.99; 3.99]); data.Properties.VariableNames=["Name", "Value"]; newName =...

alrededor de 5 años hace | 1

| aceptada

Respondida
How do I Input both x-coordinates and y-coordinates into the findpeaks function?
[pks, locs, w] = findpeaks(s, x, ...) doc findpeaks for details.

alrededor de 5 años hace | 0

Respondida
divide a matrix based on the presence of a coefficient
A = randi(5, [80, 4]); % your data u = unique(A(:, 4)); % unique values of column 4 for i=1:length(u) B{i,1} ...

alrededor de 5 años hace | 0

Respondida
Repeating sequence in xlabel
a = gca; a.XTick = (1:160); % (0:5:160) a.XTickLabel = string(mod(0:159, 20)+1); % mod(0:5:160, 20) This repeats the lab...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to find the 4th special number among pentagonal and triangular numbers
n = 1:5000; p = (3*n.^2 - n) / 2; t = (n.^2 + n ) /2; a = intersect(p, t); disp(a) The special number is 7906276

alrededor de 5 años hace | 0

| aceptada

Respondida
How to type an auto-correlation function in MATLAB
Try the following N=1000; x = randn(N+1, 1); M = 20; R = zeros(M+1, 1); for n=0:M for k=0:N-n R(n+1) = R(n+1)...

más de 5 años hace | 0

| aceptada

Respondida
title according to the file name
filename = "abc"; load(filename, "x", "y"); plot(x, y) title(sprintf("File name: %s", filename));

más de 5 años hace | 0

Respondida
Problem with while loop
Change while G < 1 G = F1.*sig1 + F11.*sig1.^2 + F2*sig2 + F22.*sig2.^2 + F3.*sig3 + F33.*sig3.^2 - 1; end to: G = F1.*...

más de 5 años hace | 1

| aceptada

Cargar más