research interests: vibrations, optimal control, system modeling and simulation, mechatronics... coding

Solved

I Plead the Fifth

Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

5 days ago

Solved

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.

Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

5 days ago

Solved

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

5 days ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

5 days ago

Solved

Pattern Sum

Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

5 days ago

Solved

Compute Fibonacci Number

Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

7 days ago

Solved

Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)

Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

10 days ago

Solved

Alternating sum

Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

10 days ago

Solved

Sum of first n terms of a harmonic progression

Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

10 days ago

Solved

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

10 days ago

Solved

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

10 days ago

Solved

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

10 days ago

Solved

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.

11 days ago

Solved

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

11 days ago

Solved

Side of an equilateral triangle

If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

11 days ago

Solved

Calculate the area of a triangle between three points

Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

11 days ago

Answered

Is it possible to fit matrix dependent variables using fitnlm ?

Yes, you can compute a nonlinear fit model using fitnm() with respect to your pre-defined model function. There are a few good ...

Is it possible to fit matrix dependent variables using fitnlm ?

Yes, you can compute a nonlinear fit model using fitnm() with respect to your pre-defined model function. There are a few good ...

16 days ago | 0

| accepted

Solved

Rainbow matrix

Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

18 days ago

Solved

Generate this matrix

Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

18 days ago

Solved

Pascal's pyramid

In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

18 days ago

Solved

Triangular matrices in 3D array

Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

18 days ago

Solved

BULLSEYE Part 2: Reference Problem 18 BULLSEYE

Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

18 days ago

Solved

ZigZag matrix with reflected format

ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

18 days ago

Answered

Composite Trapezoid rule

Here is a simple solution to this exercise: x = -1:0.02:1; y = -1:0.025:1; [xx,yy] = meshgrid(x,y); Fun = xx.^2 -2*yy.^2+xx....

Composite Trapezoid rule

Here is a simple solution to this exercise: x = -1:0.02:1; y = -1:0.025:1; [xx,yy] = meshgrid(x,y); Fun = xx.^2 -2*yy.^2+xx....

18 days ago | 0

Answered

sine wave and sampling

The solution of this exercise is relatively simple: N=40; % Size of a signal: resolution of the signal wit...

sine wave and sampling

The solution of this exercise is relatively simple: N=40; % Size of a signal: resolution of the signal wit...

18 days ago | 0

Answered

equation of inverted pendulum model

Here is the complete documentation on Inverted Pendulum's Simulink model building and how to the model blocks are implemented: h...

equation of inverted pendulum model

Here is the complete documentation on Inverted Pendulum's Simulink model building and how to the model blocks are implemented: h...

20 days ago | 0

Answered

Upgraded to 2010b - can no longer specify Fixed-Step ODE4 with continuous states

In fact, in Solver selection tab, Solver Type: Fixed-Step is selected, then all of the solvers ode1 (Euler), ode2 (Heun), ode3 (...

Upgraded to 2010b - can no longer specify Fixed-Step ODE4 with continuous states

In fact, in Solver selection tab, Solver Type: Fixed-Step is selected, then all of the solvers ode1 (Euler), ode2 (Heun), ode3 (...

20 days ago | 0

Answered

Getting wrong answer,

Hi, In your code, there are a few errors with loop indexes. Here is the fixed part of the script that gives all correct answe...

Getting wrong answer,

Hi, In your code, there are a few errors with loop indexes. Here is the fixed part of the script that gives all correct answe...

21 days ago | 0

| accepted

Answered

Accessing parsim Output Data

hi, You can make some changes in your shown code: Call the variable series of "in" computed within for .. end loop. Like: In1(...

Accessing parsim Output Data

hi, You can make some changes in your shown code: Call the variable series of "in" computed within for .. end loop. Like: In1(...

21 days ago | 0

Answered

imagesc replacement so I can see individual values colorcoded

Hi, A simple way is: spy(b)

imagesc replacement so I can see individual values colorcoded

Hi, A simple way is: spy(b)

21 days ago | 0