Solved


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

10 years ago

Solved


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

10 years ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

10 years ago

Solved


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

10 years ago

Answered
How can I import ascii File
<https://it.mathworks.com/help/matlab/ref/textread.html>

10 years ago | 3

Solved


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

10 years ago

Solved


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

10 years ago

Solved


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

10 years ago

Answered
How can I find the connected components of an image and then label them?
There are matlab functions: %compute conn components CC = bwconncomp(BW); %label them L = labelmatrix(CC);

10 years ago | 3

| accepted

Solved


Dosage by weight
A machine administer's medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageA...

10 years ago

Solved


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

10 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

10 years ago

Answered
R2014b fails to save fig file from a very large plot
I suggest you to use the known function downloadable at <https://it.mathworks.com/matlabcentral/fileexchange/23629-export-fig>...

10 years ago | 3

Solved


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

10 years ago

Solved


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

10 years ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

10 years ago

Solved


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

10 years ago

Solved


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

10 years ago

Solved


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

10 years ago

Solved


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

10 years ago

Solved


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

10 years ago

Solved


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

10 years ago

Solved


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

10 years ago

Answered
How to find the sum of all column vectors of the elements on the kth diagonal of a square matrix in Matlab ?
Here it is the code that does the work. Inspect the function *diag* and partial results at each iteration. n = size(A,1); ...

10 years ago | 3

| accepted

Solved


Concatenate two strings
Its very easy. Just concatenate two strings.

10 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

10 years ago

Solved


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

10 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

10 years ago

Solved


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

10 years ago

Solved


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

10 years ago

Load more