Gelöst


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

mehr als 6 Jahre vor

Beantwortet
Plotting the parametrised intersection of two surfaces
clear all; clc; t = linspace(-2,1,50); x = zeros(size(t)); x(:) = 2; y = -t; z = 4+(t.^2); pl...

mehr als 6 Jahre vor | 0

Gelöst


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

mehr als 6 Jahre vor

Gelöst


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

mehr als 6 Jahre vor

Beantwortet
can anyone help me to find the solution of the statement "how to get the values only in the places where A has"
C = zeros(size(A)) Crand = rand(size(C)) C(A ~= 0) = Crand(A ~= 0)

mehr als 6 Jahre vor | 0

| akzeptiert

Gelöst


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

mehr als 6 Jahre vor

Gelöst


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

mehr als 6 Jahre vor

Beantwortet
how to display matrix in msg box
Your *MGF* isn't a matrix. Encompass it with _[]_ and _;_ for row separation and it should work. See the example below: m ...

mehr als 6 Jahre vor | 0

Beantwortet
how to find the transpose
x = 1:10 x_transposed = x'

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
How can I delete values below certain treshold in vector
vector = randi(20,1,352); newVector = vector(vector<10);

mehr als 6 Jahre vor | 2

| akzeptiert

Gelöst


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

mehr als 6 Jahre vor

Gelöst


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

mehr als 6 Jahre vor

Beantwortet
histogram change over time
If you're looking for inspiration, check out the link below with plenty of examples and source code: <https://uk.mathworks.co...

mehr als 6 Jahre vor | 0

Beantwortet
for loop with exceptions
loopCounter = [2,6:2:26] for i = loopCounter i % your code end

mehr als 6 Jahre vor | 0

Beantwortet
How to plot, when one parameter is inversely proportional to fifth power of other?
This line needs to be changed: set(gca,'xtick',[1 2 3 4 5 6 7 8 9]); See if the changed code below works for ...

mehr als 6 Jahre vor | 0

| akzeptiert

Gelöst


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

mehr als 6 Jahre vor

Beantwortet
Set conditions between two matrices
clear all; clc; % DATA A = randi(50,1,360,'int16'); B = randi(50,1,360,'int16'); % LOGICAL VECTORS ...

mehr als 6 Jahre vor | 0

Gelöst


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

mehr als 6 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...

mehr als 6 Jahre vor

Gelöst


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

mehr als 6 Jahre vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

mehr als 6 Jahre vor

Gelöst


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

mehr als 6 Jahre vor

Beantwortet
Once I've found a custom equation for a scatter plot with the curve fitting tool, how do I apply that line to the scatter plot in live editor?
IF you're working on a one-off case, use the in-built tools: <</matlabcentral/answers/uploaded_files/99982/Figure-BasicFittin...

mehr als 6 Jahre vor | 0

| akzeptiert

Gelöst


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

mehr als 6 Jahre vor

Beantwortet
How to replace a value for blank
If you import the data as a *table*, I don't think you are allowed to have a 'blank values'. Consider a following example: ...

mehr als 6 Jahre vor | 0

Beantwortet
Convert a vector to a binary matrix
With LOOP: y = [1; 1; 2; 3; 4; 4]; nRow = length(y); nCol = max(y); A = zeros(nRow,nCol); ...

mehr als 6 Jahre vor | 1

Beantwortet
R[1;-1] how i write the program in matlab for random selection between 1 and -1
clear all; clc; % use 'random function' of your choice % - rand() % - randi() % - randn() % GENERATE...

mehr als 6 Jahre vor | 1

Gelöst


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

mehr als 6 Jahre vor

Mehr laden