已回答
How to ignore some elements of function returned vector?
I am sure that knowing what is _h_ and _x_ would give some other ideas, but, Why don't you just do this?: y = zeros(100...

10 years 前 | 0

| 已接受

已回答
Include function in gui m-file or separate them?
For maintenance and readability, it is a much better practice to have your functions in separated m-files. You never know when y...

10 years 前 | 0

已回答
finding common elements in a matrix
A = [ 1.3693 1.6266; 0.2054 1.3820; 1.4125 0.4844; 0.0734 0.7480; 1.0499 1.0451]...

10 years 前 | 0

已回答
Create string of dots characters
function my_dots(n) str = ''; for k=1:n str = strcat(str,'.'); end disp(str) >> my_dots(3) ... >> ...

10 years 前 | 0

已回答
How can you find the root mean square and the mean absolute of errors when the errors are in a cell format
my_cell = [0.1576] [0.9706] [0.9572] [0.4854] [0.8003] [0.1419] The mean of the first column...

10 years 前 | 0

已回答
Can I use a for loop in the condition statement of an if branch??
No, you can not use a for-loop as the condition of an if statement as in the following WRONG code: if (for k=1:3 k=k end) ...

10 years 前 | 0

已回答
How to count the number of object present in binary image?
If you are planning to do something with those objects, you could be interested in using _regionprops_. Besides the number of ob...

10 years 前 | 0

已回答
Editing Properties in gui-code
You can use the Property Inspector if you use GUIDE (right click on the object whose properties you want to modify, select Prope...

10 years 前 | 0

已回答
How to obtain the three angles (xy, yz, xz planes) of one vector relative to other vector?
I think you should project the vectors onto each plane consecutively and calculate then the angle formed by the projections: ...

10 years 前 | 1

| 已接受

已回答
how to convert rgb image to 11*92 grayscale image of type 'pgm' ?
First use gray_image = rgb2gray(RGB_image); The rescale the image: B = imresize(gray_image, scale) Take a l...

10 years 前 | 0

已回答
least squre data fit for a function of two variables
Use the curve fitting toolbox cftool take a look at doc cftool

10 years 前 | 0

已回答
plot 3 figures in 1 figure
No, there is not an easier way to plot three figures in a single window than using subplot. subplot(3,1,1) plot(x1,y1) ...

10 years 前 | 2

| 已接受

已回答
how to convert frames into avi video? give me code
From Matlab documentation: *im2frame* Convert image to movie frame Syntax f = im2frame(X,map) f = im2frame(X) ...

10 years 前 | 0

已回答
Integration of function with two variables with respect to one of them
syms P C1 C2 C3 C4 k r int(exp(1i*k*r)*(C1*cos(P*r)+C2*sin(P*r)+C3*cosh(P*r)+C4*sinh(P*r)),r,0,1) ans = C2*...

10 years 前 | 0

已回答
Changing xlim & ylim of axes sluggish
You have too many processes trying to run at the same time. Even when it sounds incoherent, insert a very short pause right afte...

10 years 前 | 0

已回答
How can I broaden an axis?
From documentation: Setting the data aspect ratio to [1 1 1] produces a surface plot with equal scaling along each axis. ...

10 years 前 | 0

| 已接受

已回答
how to combine 2 gui ?
You should add this to your first GUI. Place it in the function that calls the second GUI. % hide first GUI set(gcf,'Vis...

10 years 前 | 0

| 已接受

已回答
How do I do a prediction in motion capture ?
You should start reading about kalman filter as a way to estimate state variables. There are many references in the web and Mat...

10 years 前 | 0

已回答
How can I plot multiple results from a function on the same graph?
I guess you have to work a bit with your data, but the hold on, hold off is what you need: windspeed_user = input('please...

10 years 前 | 0

已回答
how to obtain the orthogonal vectors of one 3*1 unit vector?
a = [0.6619 0.6976 -0.2740]; b = [a(1) a(3) -a(2)]; c = cross(a,b); c = c/norm(c); M = [a;b;c]; % orthogonal matri...

10 years 前 | 0

已回答
Whats wrong with coding
In your code for j=0:4 a=sum(h(m(j):m(j+1))); ... ... the index starts at j=0, which is not matlab's way...

10 years 前 | 0

已回答
Aligning subplots (width) in a figure
Get the size of your image: [x_size y_size] = size(grayImage); Then, right after the second subplot: axis([0 x_size...

10 years 前 | 1

已回答
How to make the edge darker (increase contrast?)
Play with the limits of _imadjust_. Test the following code and see how the image contrast changes with the limit values given t...

10 years 前 | 0

已回答
How to find out single object in binary image?. & how to calculate area of that single object?
Use _regionprops_ : cc = your binary image; my_area = regionprops(cc, 'Area'); % this will return the areas of the o...

10 years 前 | 0

已回答
Why are the values I write into a file are not the same as what I read from it?
Use _fprintf_ and _fscanf_ : x = 0:.1:1; A = [x; exp(x)]; % write to file fileID = fopen('exp.txt','w'); fprint...

10 years 前 | 1

| 已接受

已回答
use of vairibles with solve
The following code should not give you any trouble: syms x b = 3; % use your own value here my_answer = solve (cos(...

10 years 前 | 0

| 已接受

已回答
extracting data points after fitting
Save the fitting in the workspace, then: my_pol = [fitting.p1 fitting.p2]; % insert the parameters from your fitting X =...

10 years 前 | 0

已回答
Fusing edges of the images..
I = imread('circuit.tif'); BW1 = edge(I,'prewitt'); BW3 = uint8(BW1*255); imshow(BW1) figure,imshow(I) figure,i...

10 years 前 | 1

| 已接受

已回答
waterfall plot with station no., depth, temperature data
For a basic representation, and if your arrays are of the same length, just use plot3 For a more sophisticated data repr...

10 years 前 | 0

已回答
Read the Text File in matlab
What's the contents of the original file? The output will depend on the coding of the original file. Were all the characters in...

10 years 前 | 0

加载更多