Respondida
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...

más de 12 años hace | 1

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

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

Respondida
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_...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

| aceptada

Respondida
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;...

más de 12 años hace | 0

Respondida
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 ...

más de 12 años hace | 0

Respondida
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(...

más de 12 años hace | 0

Respondida
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); ...

más de 12 años hace | 1

| aceptada

Respondida
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...

más de 12 años hace | 2

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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);...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

Respondida
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 ...

más de 12 años hace | 0

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

más de 12 años hace | 0

Respondida
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_...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 3

| aceptada

Respondida
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...

más de 12 años hace | 0

Respondida
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. ...

más de 12 años hace | 0

| aceptada

Respondida
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= (...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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 ...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

| aceptada

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

más de 12 años hace | 0

Respondida
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 ...

más de 12 años hace | 0

| aceptada

Cargar más