已回答
Power spectrum ploting matlab
You need to perform a Fast Fourier Trasnsform (_fft_). The following code, extracted from matlab doc: doc fft will help y...

11 years 前 | 1

已回答
Creating Array Struct From excel file
field_name = 'field_to_be'; myStruct.(field_name) = 4; >> myStruct myStruct = field_to_be2: 4

11 years 前 | 0

已回答
how can i browse an image using matlab gui?
Add the following to the pushbutton callback function [filename, pathname, filterindex] = uigetfile('*.png', 'Pick a .PNG...

11 years 前 | 0

| 已接受

已回答
Find the edge of an image
Are you sure you are assigning matrices correctly? Try this out. In this case, _I_ is an image in matlab database. _nI_ can no...

11 years 前 | 0

已回答
Find the edge of an image
There is shorter way to do this, but the idea is this: [rows cols] = size(I); nI = zeros(rows,cols); for row = 1:rows...

11 years 前 | 0

已回答
does i need to set a cal back for result(static text) for the calculator?
I guess you included a " = " button, didn't you? ON the callback function of the " = " button, set the result box string to the...

11 years 前 | 0

| 已接受

已回答
Error running GUI outside of GUIDE
Are you trying to run the m-file associated to the fig-file? You have to run the .m file in order to run your GUI. ( Right c...

11 years 前 | 1

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

| 已接受

加载更多