301 total contributions since 2019

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

Answered

Finding Complex root for the nonlinear equation with single variable

Hi Ammar, Since your exercise is a nonlinear equation and thus, it is more appropriate to employ Newton-Raphson method for th...

Finding Complex root for the nonlinear equation with single variable

Hi Ammar, Since your exercise is a nonlinear equation and thus, it is more appropriate to employ Newton-Raphson method for th...

2 days ago | 0

Answered

Plotting Sum of series

Hi, In your exercise, it is more appropriate to use numerical solution approach instead of symbolic math. Here is one of th...

Plotting Sum of series

Hi, In your exercise, it is more appropriate to use numerical solution approach instead of symbolic math. Here is one of th...

2 days ago | 1

| accepted

Answered

Legend function does not work in R2019b

Hi, Your code is running ok in Win 10 and MATLAB 2019b. You should close all figure windows, run clear all command or/and if ...

Legend function does not work in R2019b

Hi, Your code is running ok in Win 10 and MATLAB 2019b. You should close all figure windows, run clear all command or/and if ...

2 days ago | 0

Answered

Export data based on latitude and longitude from 3 dimension array

Hi Bekzad, here is the answer: load time TT =datetime(t, 'convertfrom', 'excel'); Now TT are dates. Good luck.

Export data based on latitude and longitude from 3 dimension array

Hi Bekzad, here is the answer: load time TT =datetime(t, 'convertfrom', 'excel'); Now TT are dates. Good luck.

2 days ago | 0

| accepted

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

3 days ago

Solved

Make an awesome ramp for a tiny motorcycle stuntman

Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

3 days ago

Solved

03 - Matrix Variables 1

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

3 days ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

3 days ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

3 days ago

Answered

How do I load the desired columns and rows I want from a csv file?

Hi, The good solution of your exercise is to use xlsread(), e.g. DATA = xlsread('MY_data.xls', 1, 'B1:B999'); Note that the...

How do I load the desired columns and rows I want from a csv file?

Hi, The good solution of your exercise is to use xlsread(), e.g. DATA = xlsread('MY_data.xls', 1, 'B1:B999'); Note that the...

3 days ago | 0

Answered

How to convert 3d array to raster (tiff)

Hi, You can get much of help from this source. Good luck.

How to convert 3d array to raster (tiff)

Hi, You can get much of help from this source. Good luck.

3 days ago | 1

Answered

Performing a Double Integration

Hi, Here is the corrected code of yours: Beta = 0.2; fun3 = @(x,y) (sqrt( (((1 + 6*Beta)*cos(x) - 6*Beta*sin(x) + 3*Beta*co...

Performing a Double Integration

Hi, Here is the corrected code of yours: Beta = 0.2; fun3 = @(x,y) (sqrt( (((1 + 6*Beta)*cos(x) - 6*Beta*sin(x) + 3*Beta*co...

3 days ago | 0

| accepted

Answered

How can I implementation Array factor in matlab?

Hi, In your exercise, you can use [for .. end] or [while ... end] loops with two nested iteration loops. Good luck.

How can I implementation Array factor in matlab?

Hi, In your exercise, you can use [for .. end] or [while ... end] loops with two nested iteration loops. Good luck.

3 days ago | 0

| accepted

Answered

How can I compare variables in two different scripts and two different data sets?

Hi, In general, there are several steps you'd need to perform to compare the data from different data files. Read/import dat...

How can I compare variables in two different scripts and two different data sets?

Hi, In general, there are several steps you'd need to perform to compare the data from different data files. Read/import dat...

3 days ago | 0

Answered

Error using Taylor with order n as variable

Hi, Here is the complete answer to your exercise: syms x f(x) = atan(x); syms ii positive integer; for ii=1:10 P(ii) = t...

Error using Taylor with order n as variable

Hi, Here is the complete answer to your exercise: syms x f(x) = atan(x); syms ii positive integer; for ii=1:10 P(ii) = t...

3 days ago | 0

| accepted

Answered

who can i solev this question?

The answer is there: A = [1 -2 3 0; -1 1 0 2; 0 2 0 3; 3 4 0 -2]; det(A)

who can i solev this question?

The answer is there: A = [1 -2 3 0; -1 1 0 2; 0 2 0 3; 3 4 0 -2]; det(A)

3 days ago | 0

Answered

How do you apply amplitude modulation to a wav file?

Hi, 1st you would need to read the wav file with: [YY, fs] = audioread('MY_wav.wav'); then perform the AM operations with yx...

How do you apply amplitude modulation to a wav file?

Hi, 1st you would need to read the wav file with: [YY, fs] = audioread('MY_wav.wav'); then perform the AM operations with yx...

3 days ago | 0

| accepted

Answered

why 'colormap' did not change the color of my plots?

Hi, in order to get the colormap effect, the plot has to be 3D (like mesh, surf, etc), e.g.: H=figure, [x, y] = meshgrid(l...

why 'colormap' did not change the color of my plots?

Hi, in order to get the colormap effect, the plot has to be 3D (like mesh, surf, etc), e.g.: H=figure, [x, y] = meshgrid(l...

3 days ago | 1

Answered

How can I assign plotting properties to a subplot within a loop

Hi, You have done well in all steps except for one small point after else condition: for k = 1:3 figure(1) subplo...

How can I assign plotting properties to a subplot within a loop

Hi, You have done well in all steps except for one small point after else condition: for k = 1:3 figure(1) subplo...

3 days ago | 0

| accepted

Answered

How can I identify the x-values at which the first difference peaks?

Hi, Those 8 peak values of the variable bla can be obtained with: Peaks_bla = bla(idx); Good luck.

How can I identify the x-values at which the first difference peaks?

Hi, Those 8 peak values of the variable bla can be obtained with: Peaks_bla = bla(idx); Good luck.

3 days ago | 0

Solved

Find last zero for each column

Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

5 days ago

Solved

Create an index-powered vector

Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

5 days ago

Solved

Find nth maximum

Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

5 days ago

Answered

Why wont it output index?

Just use: [MAX_VAL, INDEX] = min(x) % instead of max() Good luck.

Why wont it output index?

Just use: [MAX_VAL, INDEX] = min(x) % instead of max() Good luck.

5 days ago | 0

Answered

How to add x labels, y labels, z label and title to a surface plot

title('My plot 3D ....') all of them can be put at the end of your code. Good luck.

How to add x labels, y labels, z label and title to a surface plot

title('My plot 3D ....') all of them can be put at the end of your code. Good luck.

5 days ago | 0

Answered

How to add x labels, y labels, z label and title to a surface plot

Just simple as: xlabel('X'), ylabel('Y'), zlabel('Z') Or you can add some notes xlabel('xx notes'), ylabel('yy notes'), z...

How to add x labels, y labels, z label and title to a surface plot

Just simple as: xlabel('X'), ylabel('Y'), zlabel('Z') Or you can add some notes xlabel('xx notes'), ylabel('yy notes'), z...

6 days ago | 0

| accepted

Answered

How can I save a PDF without margins

Hi, you can try to use this option: print('-fillpage','FillPageFigure','-dpdf') good luck.

How can I save a PDF without margins

Hi, you can try to use this option: print('-fillpage','FillPageFigure','-dpdf') good luck.

6 days ago | 0

Answered

Why wont it output index?

Hi, You have done everything correctly except for a couple of minor flaws. Here is the corrected code: function output = MyM...

Why wont it output index?

Hi, You have done everything correctly except for a couple of minor flaws. Here is the corrected code: function output = MyM...

6 days ago | 0

| accepted

Answered

How can I Import complex vector to SIMULINK to analyze it using spectrum analyzer?

Hi, In this case, the solution can be to feed your model with the real part and imaginary part of your input data (complex va...

How can I Import complex vector to SIMULINK to analyze it using spectrum analyzer?

Hi, In this case, the solution can be to feed your model with the real part and imaginary part of your input data (complex va...

6 days ago | 0