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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 2

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 3

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

Mehr laden