Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Frage


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.

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

etwa 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

mehr als 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

mehr als 8 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


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

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Gelöst


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

mehr als 8 Jahre vor

Frage


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

mehr als 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

mehr als 8 Jahre vor | 2 Antworten | 0

2

Antworten