已回答
How should I code for the max value of a slider?
If N_frames is the number of frames: set(handles.your_slider,'Max',N_frames); set(handles.your_slider,'SliderStep',[1/N_...

11 years 前 | 0

| 已接受

已回答
Display a plot from simulink in a seperate window to GUI
You have several options for that. You could place an axes object within your GUI. This axes will have a tag assigned (see prop...

11 years 前 | 1

| 已接受

已回答
Counting the number of runs in a sequence
A=[1,1,1,0,0,1,1,1,1,0,0,0,0,1]; N_runs = 1; for k=2:length(A) if A(k)~=A(k-1) N_runs = N_runs +1;...

11 years 前 | 0

已回答
How can I increase the the number of data-points in a scattered data set?
Just skip the sort command, I did it for testing purposes. The _interp_ will create new point in between every consecutive pair ...

11 years 前 | 0

已回答
How to superimpose contourf plot over a gray scale image
Solution given Teja Muppirala more than a year ago: %Make some sample grayscale image I = abs(sin((1:500)'/100)*sin(...

11 years 前 | 0

已回答
How can I increase the the number of data-points in a scattered data set?
M=rand(50,3); M(:,3) = 0; M = sort(M,1,'ascend'); % double the data in X column x_extended = interp(M(:,1),2); ...

11 years 前 | 1

| 已接受

已回答
Creating user defined commands in Matlab
Copy all your m-files to a directory. Then go to the upper left corner of MATLAB layout. Then, click on File -> Set Path. Choo...

11 years 前 | 1

已回答
Do you have to have an FFT to do an IFFT?
You do not have to have used _fft_ before using _ifft_. The following will work: x=rand(100,1); b=ifft(x); The subjec...

11 years 前 | 0

| 已接受

已回答
Creating a 2-D matrix from a 1-D Array?
You do not make clear how you want to replicate your data, but this is a way: A = [150 11 12 134 130 152]; L = numel(A);...

11 years 前 | 0

已回答
Real Time Data Acquisition With Arduino Analog Input
Assuming the code on the Arduino side is sending something ( check it out, please ), and that the arduino object points to the r...

11 years 前 | 0

已回答
Curve fitting with a known coefficient
You can use the curve fitting tool. Type: cftool at the command window. Then, select " custom equation " as your target ...

11 years 前 | 0

已回答
can matlab generate transfer function automatically??
It all depends on your data. Take a look at matlab's help: help tf or: doc tf

11 years 前 | 0

已回答
Clearing axis data from a GUIDE-generated figure
The following code, given by one of the contributors long ago, will help you to undo the last plotting step: function undo_...

11 years 前 | 0

| 已接受

已回答
Running an m file by clicking on a pushbutton in GUI
To run a m-file from a GUI, just insert the name of the m-file in the pushbutton callback function. It works the other way arou...

11 years 前 | 3

| 已接受

已回答
Reshape array for 256 by 256 matrix showing 16 by 256
To reshape/resize an image, use: imresize Type: help imresize Or doc imresize for all the informat...

11 years 前 | 0

已回答
Something is wrong with this simple code.
Make sure the data array UntitledVoltage(k) contains some negative data, otherwise the while loop will go on for ever. ...

11 years 前 | 0

| 已接受

已回答
Bode form of a transfer function
s=tf('s'); % dummy values for the parameters k=1; z1=1; p1=1; p2=1; H=k*(s-z1)/((s - p1)*(s - p2)); k2= (...

11 years 前 | 0

已回答
How to check the value of a varriable of a subfunction?
Place the code in the sub_function that holds the variable you want to send to the workspace to see its value, just after the va...

11 years 前 | 0

| 已接受

已回答
How to read the designated position date in excel
% Read a specific range of data: subsetA = xlsread('myExample.xls', 1, 'B2:C3') type help xlsread or ...

11 years 前 | 0

| 已接受

已回答
Draw circle in a image
imshow(your_image); hold on t=0:0.1:2*pi; %x_o and y_o = center of circle x = x_o + radio*sin(t); y = y_o + radio...

11 years 前 | 0

| 已接受

已回答
How to copy one image to another (blank) pixel by pixel?
Xc = imread('Arinaga+29+de+mayo+de+2013-3.jpg'); [sizex sizey sizez]= size(Xc); blank = zeros(sizex,sizey,si...

11 years 前 | 1

| 已接受

已回答
IF loop end if
use _break_ after you get the desired value. It will take you out of the for loop

11 years 前 | 0

已回答
confused with atan2d for negative number
Because you measure the angle in a different quadrant. It's not the same -20 degrees than 20 degrees. Matlab documentation is ...

11 years 前 | 0

| 已接受

已回答
Polyval gives me a error
Try this out: g= fit(z',y,'poly1'); P=[g.p1 g.p2]; t1 = polyval(P,0.001)

11 years 前 | 0

已回答
how to convert image into square matrix??
Use _imresize_: B = imresize(A, [numrows numcols])

11 years 前 | 0

| 已接受

已回答
problem with subscript indices and varibles in functions
It is just that what the error message says, you are trying to access the image with a non integer index. Check your indexes ou...

11 years 前 | 0

已回答
How to make loops run faster
Your problems could lay on the _Eon_pris_t(i,j)_ _Gaspris_t(i,j)_ functions: The calling itself takes its time, although it sh...

11 years 前 | 0

已回答
.m file to excutable file in linux
You are dealing with two different platforms. The software you create in one, is not easily usable in the other. You can try i...

11 years 前 | 0

已回答
returning the input value with maximum output
There are several choices to find minimum/maximum values. You can take a look at the built-in function _fmincon_ for example. I...

11 years 前 | 0

| 已接受

已回答
what does these block means and how they work?
It is a feedback system with a step signal as input. This input has a gain ( 2 ) and it is integrated. It looks like a simple i...

11 years 前 | 0

加载更多