Solved


Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

9 years ago

Solved


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

9 years ago

Solved


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

9 years ago

Solved


Calculate the answer to life the universe and everything
<https://en.wikipedia.org/wiki/42_(number)>

9 years ago

Solved


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

9 years ago

Solved


Rotate Matrix Depending on the input
Rotate matrix (CounterClockwise) via 90, 180 or -90 depending on the input Ex. a = [1 2 3; 4 5 6; 7 8 9] b = 90; ...

9 years ago

Solved


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

9 years ago

Solved


Basic commands - search path
Please list all search path from Matlab.

9 years ago

Solved


Basic commands - Where did I install Matlab?
Please make a function, which returns path to Matlab installation folder

9 years ago

Solved


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

9 years ago

Solved


Basic commands - Which matlab files are here?
Please make a function which will list all specific for Matlab files in current folder.

9 years ago

Solved


square root
find square root of a number

9 years ago

Solved


double
Return twice the value of the number

9 years ago

Solved


list folder contents
list the contents of a folder

9 years ago

Solved


Basic commands - What if you can't use mod?
There is a function to calculate remainder after division, but it's not mod. Can you remmeber that function? HINT: Try to lo...

9 years ago

Answered
separate the red part of imge
A naive approach would be to extract "red" colors from the image: I = imread('peppers.png'); R = I(:,:,1); G = I(:,...

9 years ago | 2

| accepted

Answered
montage of 3 image
See <https://www.mathworks.com/help/images/ref/montage.html montage>. An example: I = imread('peppers.png'); R = I(:,...

9 years ago | 0

| accepted

Answered
Why does 'Position' property not change the width of uicontrol slider?
The width of the slider is the third element of the Position vector, not the fourth, which is height. Try something like: s...

9 years ago | 0

Answered
How do i recognize the text is written in which language?
Read this: <http://www.mathworks.com/help/vision/ug/ocr-language-data-files-.html Install OCR Language Data Support Packages> ...

9 years ago | 0

| accepted

Answered
why this gives me "Index exceeds matrix dimensions?" can any one help me. Thanks in advance
Are you sure the image is RGB instead of grayscale? As the error suggests, the variable img must not have a 2 layer in the 3rd d...

9 years ago | 0

Answered
How to paste matlab table into Excel with headers
Try using <https://www.mathworks.com/help/matlab/ref/writetable.html writetable> instead of copy-and-paste.

9 years ago | 0

Answered
Using i as an index within a loop in Matlab 2016a
I don't know what you mean by "this code barfs". I ran a simple for-loop in MATLAB R2016a with i as the index variable and exper...

9 years ago | 0

| accepted

Answered
Why does input() display this string improperly?
I could not reproduce your error, but I am using R2016a, so maybe that is the reason. As an alternative, try: str = spri...

9 years ago | 1

Answered
How to write a Matlab script that is able to output images of triangles based on the size input? The following shows the half of a triangle but i can't find a way to make an isolated triangle. (The size you can put at range 3 - 8 )
What types of triangles do you need? And what will they be used for? If you need very basic triangles, you could use the tria...

9 years ago | 0

| accepted

Answered
Im trying to print a randomized vector with 20 columns for each row. How do I get to stop after it reaches the final value of the vector?
If I understand your code correctly, it appears that you want to create a 65x65 matrix of random integers in the range [0 9] tha...

9 years ago | 0

Answered
Clustering by kmean?
See the documentation on the <https://www.mathworks.com/help/stats/kmeans.html kmeans> function. IDX = kmeans(X,K) The f...

9 years ago | 1

| accepted

Answered
How to create a loop with the sum adding up to a given N?
This sounds like a homework problem. The answer is basically already in the question. N = 10; x = 0; for ii=1:N ...

9 years ago | 0

Answered
Is it possible to execute 2 scripts in 2 different matlab sessions at the same time, both using parfor?
Can you provide more details about your code? How do you create the pool? How many workers are you using? I am having trouble...

9 years ago | 0

Solved


Get Determinants
Get the determinant of matrix Please have a pride on not using built-in Matlab functions :)

9 years ago

Problem


Check if a directory is on the current MATLAB search path
Given a directory name as a string, return true if the directory is on the current MATLAB search path, and false otherwise.

9 years ago | 1 | 18 solvers

Load more