已回答
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...

8 years 前 | 2

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

8 years 前 | 2

| 已接受

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

8 years 前 | 0

| 已接受

已回答
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...

8 years 前 | 0

已回答
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> ...

8 years 前 | 0

| 已接受

已回答
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...

8 years 前 | 0

已回答
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.

8 years 前 | 0

已回答
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...

8 years 前 | 0

| 已接受

已回答
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...

8 years 前 | 1

已回答
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...

8 years 前 | 0

| 已接受

已回答
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...

8 years 前 | 0

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

8 years 前 | 1

| 已接受

已回答
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 ...

8 years 前 | 0

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

| 已接受

已回答
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 ...

8 years 前 | 1

| 已接受

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

| 已接受

已回答
Make video from images
I usually use the <http://www.mathworks.com/help/matlab/ref/videowriter.html VideoWriter> class for making movies in MATLAB. ...

8 years 前 | 5

已回答
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. ...

8 years 前 | 0

| 已接受

已回答
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 ...

8 years 前 | 1

| 已接受

已回答
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...

8 years 前 | 0

| 已接受

已回答
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...

8 years 前 | 5

| 已接受

已回答
manipulating face detection code?
Try this: cnt = 0; for ii=1:10 filename = sprintf('%d.jpg',ii); I = imread(filename); BB = step(EyeDetect...

8 years 前 | 1

| 已接受

已回答
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 ...

8 years 前 | 0

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 0

加载更多