A répondu

a matlab code of getting a value uniformly at random from a the set {-1,1}

To generate values uniformly from the set {-1,1}, use: N = 100; x = 2*(rand(N,1)>0.5)-1; where N is the number of val...

a matlab code of getting a value uniformly at random from a the set {-1,1}

To generate values uniformly from the set {-1,1}, use: N = 100; x = 2*(rand(N,1)>0.5)-1; where N is the number of val...

plus de 6 ans il y a | 2

A répondu

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

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

plus de 6 ans il y a | 2

| A accepté

A répondu

montage of 3 image

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

montage of 3 image

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

plus de 6 ans il y a | 0

| A accepté

A répondu

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

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

plus de 6 ans il y a | 0

A répondu

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

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

plus de 6 ans il y a | 0

| A accepté

A répondu

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

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

plus de 6 ans il y a | 0

A répondu

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.

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.

plus de 6 ans il y a | 0

A répondu

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

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

plus de 6 ans il y a | 0

| A accepté

A répondu

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

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

plus de 6 ans il y a | 1

A répondu

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

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

plus de 6 ans il y a | 0

| A accepté

A répondu

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

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

plus de 6 ans il y a | 0

A répondu

Clustering by kmean?

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

Clustering by kmean?

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

plus de 6 ans il y a | 1

| A accepté

A répondu

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

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

plus de 6 ans il y a | 0

A répondu

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

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

plus de 6 ans il y a | 0

A répondu

How to find whether a ROI handle exist, if the ROI is not visible in the figure axes?

What do you mean by "display the updated image in GUI axes"? If you mean that you make a call to imshow or imagesc, then chances...

How to find whether a ROI handle exist, if the ROI is not visible in the figure axes?

What do you mean by "display the updated image in GUI axes"? If you mean that you make a call to imshow or imagesc, then chances...

plus de 6 ans il y a | 0

| A accepté

A répondu

How to change or modify variable that already exists netcdf ?

There should be no output arguments for ncwrite. Check the documentation <http://www.mathworks.com/help/matlab/ref/ncwrite.html ...

How to change or modify variable that already exists netcdf ?

There should be no output arguments for ncwrite. Check the documentation <http://www.mathworks.com/help/matlab/ref/ncwrite.html ...

plus de 6 ans il y a | 1

| A accepté

A répondu

How can I use the imgaussfilt() function to process several images i have already saved into an array in the workspace?

It looks like you are sending a cell array to the imgaussfilt function instead of just a single image. Watch your indexing. Chan...

How can I use the imgaussfilt() function to process several images i have already saved into an array in the workspace?

It looks like you are sending a cell array to the imgaussfilt function instead of just a single image. Watch your indexing. Chan...

plus de 6 ans il y a | 0

A répondu

Plotting on axes in a GUI after running the GUI's callback from a different script

Why do you want to run the callback from a script instead of using the pushbutton? testGUI('plot_button_Callback',fig_handl...

Plotting on axes in a GUI after running the GUI's callback from a different script

Why do you want to run the callback from a script instead of using the pushbutton? testGUI('plot_button_Callback',fig_handl...

plus de 6 ans il y a | 0

A répondu

How to return array of pixel values associated with image matrix (C)?

Try using <https://www.mathworks.com/help/images/ref/mat2gray.html mat2gray>. I = mat2gray(flipud(C),clim); EDIT: the co...

How to return array of pixel values associated with image matrix (C)?

Try using <https://www.mathworks.com/help/images/ref/mat2gray.html mat2gray>. I = mat2gray(flipud(C),clim); EDIT: the co...

plus de 6 ans il y a | 0

A répondu

How to calculate the NN outputs manually?

If you use a squashing function on the output, then yes, it is impossible to get a result of 100 at an output. If you need to ha...

How to calculate the NN outputs manually?

If you use a squashing function on the output, then yes, it is impossible to get a result of 100 at an output. If you need to ha...

plus de 6 ans il y a | 0

| A accepté

A répondu

Make video from images

I usually use the <http://www.mathworks.com/help/matlab/ref/videowriter.html VideoWriter> class for making movies in MATLAB. ...

Make video from images

I usually use the <http://www.mathworks.com/help/matlab/ref/videowriter.html VideoWriter> class for making movies in MATLAB. ...

presque 7 ans il y a | 4

A répondu

Removing all zeros in rows

It is not possible to have a (full) array with varying number of rows. MATLAB wants to store something in those empty spots. ...

Removing all zeros in rows

It is not possible to have a (full) array with varying number of rows. MATLAB wants to store something in those empty spots. ...

presque 7 ans il y a | 0

| A accepté

A répondu

Possible bug in struct2table()

You may have already noticed this, but the error is due to having fields with an unequal number of rows. When you pass a scalar ...

Possible bug in struct2table()

You may have already noticed this, but the error is due to having fields with an unequal number of rows. When you pass a scalar ...

presque 7 ans il y a | 1

| A accepté

A répondu

How to make annotation circle.? Current code appear in a box.

The function call is RGB = insertObjectAnnotation(I,shape,position,label). Change shape from 'rectangle' to 'circle', and cha...

How to make annotation circle.? Current code appear in a box.

The function call is RGB = insertObjectAnnotation(I,shape,position,label). Change shape from 'rectangle' to 'circle', and cha...

presque 7 ans il y a | 0

| A accepté

A répondu

how would i track the speed of the centroid of the moving objects?

If it is acceptable to compute velocities post hoc, I suggest the following edits to this code: 1. Add tracks as an output so...

how would i track the speed of the centroid of the moving objects?

If it is acceptable to compute velocities post hoc, I suggest the following edits to this code: 1. Add tracks as an output so...

presque 7 ans il y a | 5

| A accepté

A répondu

manipulating face detection code?

Try this: cnt = 0; for ii=1:10 filename = sprintf('%d.jpg',ii); I = imread(filename); BB = step(EyeDetect...

manipulating face detection code?

Try this: cnt = 0; for ii=1:10 filename = sprintf('%d.jpg',ii); I = imread(filename); BB = step(EyeDetect...

presque 7 ans il y a | 1

| A accepté

A répondu

Write a script that will create a (random) vector of ages then make a graph in matlab

Instead of asking the community to write the full script for you, I suggest trying to write something yourself and then posting ...

Write a script that will create a (random) vector of ages then make a graph in matlab

Instead of asking the community to write the full script for you, I suggest trying to write something yourself and then posting ...

presque 7 ans il y a | 0

A répondu

I am trying to obtain a series of vectors made of elements from a larger vector given they exceed a threshold

The reason your code does not currently work is because you are trying to assign a vector ( Z(Z>Z(i)) ) to a scalar element in a...

I am trying to obtain a series of vectors made of elements from a larger vector given they exceed a threshold

The reason your code does not currently work is because you are trying to assign a vector ( Z(Z>Z(i)) ) to a scalar element in a...

presque 7 ans il y a | 0

A répondu

Transform two vectors into a single one

Are all values of A and B integers? Do you know that all elements of A will be nonzero and that all elements of B will be less t...

Transform two vectors into a single one

Are all values of A and B integers? Do you know that all elements of A will be nonzero and that all elements of B will be less t...

presque 7 ans il y a | 0

A répondu

Mushroom detection in a photo

When you say you have tried Hough circles, do you mean <http://www.mathworks.com/help/images/ref/imfindcircles.html imfindcircle...

Mushroom detection in a photo

When you say you have tried Hough circles, do you mean <http://www.mathworks.com/help/images/ref/imfindcircles.html imfindcircle...

presque 7 ans il y a | 0