Solved

Linear system of equations

Solve the system of equations in three variables.

environ 2 mois ago

Answered

how can i read data given from a txt file and plot graph

You may check this other anser related to import data: https://www.mathworks.com/matlabcentral/answers/460098-import-text-data-...

how can i read data given from a txt file and plot graph

You may check this other anser related to import data: https://www.mathworks.com/matlabcentral/answers/460098-import-text-data-...

7 mois ago | 0

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

7 mois ago

Solved

Read a column of numbers and interpolate missing data

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

7 mois ago

Solved

Find the two most distant points

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

7 mois ago

Solved

Duplicates

Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

7 mois ago

Solved

Counting Sequence

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

7 mois ago

Answered

Randomly dividing an integer (non-uniform distribution)

How about you generate n variable from a desired range. For example: n = (b-a)*rand(1,M)+a; So you have, % Range a = 0.01; ...

Randomly dividing an integer (non-uniform distribution)

How about you generate n variable from a desired range. For example: n = (b-a)*rand(1,M)+a; So you have, % Range a = 0.01; ...

7 mois ago | 1

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

7 mois ago

Solved

Find common elements in matrix rows

Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

7 mois ago

Solved

matrix of natural number

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

7 mois 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? <<http://upload.wikimedia.org/wikipe...

7 mois ago

Answered

How to smooth the plot graph?

After you plot the position profile add the following code: for i=5:30; p = polyfit(time, theta,i); y1 = polyval(p,ti...

How to smooth the plot graph?

After you plot the position profile add the following code: for i=5:30; p = polyfit(time, theta,i); y1 = polyval(p,ti...

7 mois ago | 0

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

7 mois ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

7 mois ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

7 mois ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

7 mois ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

7 mois ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

7 mois ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

7 mois ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

7 mois ago

Answered

Runge Kutta 4th order

Your code seems to have some issues. Try this one: h = pi/10; x = 0 : h : 2*pi; n = length(x); y = zeros(2,n); y(:,1) =...

Runge Kutta 4th order

Your code seems to have some issues. Try this one: h = pi/10; x = 0 : h : 2*pi; n = length(x); y = zeros(2,n); y(:,1) =...

7 mois ago | 1

| accepted

Answered

How to view plotting in real time

Hi Mekala, Alternatevely, you can run the follow code: x = [1,2,3,4,5,6,7,8,9]; y = [1,2,3,4,5,6,7,8,9]; figure; hold on...

How to view plotting in real time

Hi Mekala, Alternatevely, you can run the follow code: x = [1,2,3,4,5,6,7,8,9]; y = [1,2,3,4,5,6,7,8,9]; figure; hold on...

7 mois ago | 1

| accepted

Answered

Using specific color vector in plot

Hi Kelsey, You need to use the attribute 'color'. See the following example: plot([0 1], [0 1], 'color', [1 0 0])

Using specific color vector in plot

Hi Kelsey, You need to use the attribute 'color'. See the following example: plot([0 1], [0 1], 'color', [1 0 0])

7 mois ago | 0

| accepted

Answered

lambda function with if statement

You can use the following line of code: X = @(om) (1*(abs(om)==1) + 0*(abs(om)~=1));

lambda function with if statement

You can use the following line of code: X = @(om) (1*(abs(om)==1) + 0*(abs(om)~=1));

7 mois ago | 2

Answered

Compare output with each row and column from a table.

You might create a function to perform this task, an dyou call it as many times you desire. % function return status function...

Compare output with each row and column from a table.

You might create a function to perform this task, an dyou call it as many times you desire. % function return status function...

7 mois ago | 0

Answered

Variable changes to previously calculated value each iteration.

Since T is an array and you are using a for loop to find each value of p2(T), you should you T(i) instead of T. Check the co...

Variable changes to previously calculated value each iteration.

Since T is an array and you are using a for loop to find each value of p2(T), you should you T(i) instead of T. Check the co...

7 mois ago | 0

Answered

HOW CAN I CREATE A MATRIX FILE FROM 3 EXCEL FILES

First, there is several ways to import data into Matlab. CHeck the following link: https://www.mathworks.com/help/matlab/import...

HOW CAN I CREATE A MATRIX FILE FROM 3 EXCEL FILES

First, there is several ways to import data into Matlab. CHeck the following link: https://www.mathworks.com/help/matlab/import...

7 mois ago | 0