Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

8 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

8 years ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

8 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

8 years 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]; and ...

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

8 years ago

Solved


Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

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

8 years ago

Question


How can MATLAB find and replace a word in a text that contains multiple lines?
E.g. if there is a text file with 57 lines and I want a small change of a word in line 54.

8 years ago | 1 answer | 0

1

answer

Question


Can I manipulate an existing Excel file through MATLAB?
I have an existing Excel file that has several mathematical operations into it. I want to insert several values through MATLAB, ...

8 years ago | 0 answers | 0

0

answers

Question


Turning a row matrix of numbers into a row matrix of vectors.
I want to do something like this: I have the following matrix: A = [1 5 7] I want to turn it into: Anew = [1:6 (...

8 years ago | 0 answers | 0

0

answers

Question


Square matrix with relationships among equal rows.
I have a matrix with the following form: A = [ 9 9 9; 5 6 5; 9 9 9; 4 4 2; 5 6 5; 5 6 5; 4 4 4; 9 9 9] If a particular...

8 years ago | 3 answers | 0

3

answers

Question


I have three columns containing data. I want to isolate particular data depending on the third column and find the maximum values on the second column for each case of the isolated data from the third column.
I have a matrix with the following form: A = [1 2 3; 2 2 6; 0 1 3; 0 4 3] I want for each unique case from the third c...

8 years ago | 1 answer | 0

1

answer

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

8 years ago

Question


What is a code to remove elements that are identical between each other, in the 2 columns in a nx2 matrix?
If I have a matrix like: A = [2 5; 5 6; 1 1; 2 2; 4 8; 2 6; 3 3] What is a generalized code to remove the element...

8 years ago | 0 answers | 0

0

answers

Question


How do I break a complex loop with a multiple-if structure?
I am writing a code that has the following form: for i = 1:size(interiorcolumns,1) if interiorcolumns{i}(6) == height...

8 years ago | 2 answers | 0

2

answers