已回答
Fastest way to import single column?
From matlab's documentation: Using a text editor, create a file scan1.dat that contains data in the following form: 09/1...

10 years 前 | 0

已回答
Why does my keyboard frequently stop working (only in Matlab)?
Go to File -> Preferences -> Keyboard -> Shortcuts. Make sure everything is set alright there. Action Name Vs Shortcuts w...

10 years 前 | 0

已回答
Adding rows with constraint
a=[ 10,11,8; 6,5,7; 4,6,5; 0,0,5]; output = zeros(size(a)); output(1,:) = a(1,:);% ...

10 years 前 | 0

已回答
How I can solve a simple system of equations
Define k as symbolic syms k alpha = 0.6; beta = alpha; A = 7; xi = 0 ; gamma = 0.3; debt = 0.05; % d...

10 years 前 | 0

已回答
M file and S function block
You can call your model containing your S-function block from a script (m-file) using the find_system('Name','your_model')...

10 years 前 | 0

| 已接受

已回答
Matlab Gui disapear(closes) after program executed
Make sure you do not have a close all anywhere in your code. It is common practice to add a clear all close al...

10 years 前 | 0

| 已接受

已回答
Assignment of values in an empty matrix by logical indices
matlab start indexing arrays with 1. Arrays in Matlab do not have element in position 0. H(3,false) = H(3,0) what does n...

10 years 前 | 0

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

加载更多