Answered
hist problem
unique(out) gives 25, that means you ask for 25 bins, you can see it because you get counts and values with 25 elements. do i...

14 years ago | 0

| accepted

Answered
YDataSource problems
Use lines instead of plots and change their xdata and ydata everytime you want to update them. I can't understand that code, yo...

14 years ago | 0

Answered
Setting value to zero at random
idx=find(max(nonzeros(A))==A); B(randi([idx(1) idx(end)]))=0

14 years ago | 1

| accepted

Answered
convert strings back to variable names?
Just a simple example on how to create 3 variables with predetermined values. v={'x1a','x2b','xA'}; values={10,20,30}; ...

14 years ago | 7

Answered
How to set axes grid color?
set(axes_handle,'XGrid','off') set(axes_handle,'YGrid','off') or all in one line set(gca,'YGrid','off','YGrid','off')

14 years ago | 0

| accepted

Answered
How to Open file with GUI's axes multiple times?
% --- Executes on mouse press over axes background. function axes1_ButtonDownFcn(hObject, eventdata, handles) % hObject ...

14 years ago | 0

| accepted

Answered
How to enter an input in an active 'while' loop?
Take a look at my program <http://www.mathworks.com/matlabcentral/fileexchange/29618-spspj SpSpj> , might not be the best way to...

14 years ago | 0

| accepted

Answered
Viewing Time vs Frequency in Simulink
This is the code just for MATLAB t = 0:0.001:10; % 10 seconds @ 1kHz sample rate fo = 10; f1 = 400; % Start at 10...

14 years ago | 1

| accepted

Answered
How to get x,y coordinates of each pixels in a connected component ??
bw = imread('text.png'); L = bwlabel(bw); s = regionprops(L, 'centroid'); XY=[s.Centroid]; ax=axes hold on ...

14 years ago | 0

Answered
Reshowing an image in a programmatic gui
Everytime you use imshow you must also give that image the tools, example: handles.fig=figure handles.ax=axes handles...

14 years ago | 0

Answered
Create variable in workspace
function MakeMyVar(VarName,VarValue) assignin('base',VarName,VarValue) end

14 years ago | 1

| accepted

Answered
What is the algorithm used by freqz?
edit freqz and see how it works

14 years ago | 0

Answered
GUI
<http://www.mathworks.com/help/toolbox/imaq/f11-74309.html Previewing Data> <http://www.mathworks.com/matlabcentral/fileexcha...

14 years ago | 0

| accepted

Answered
strfind in simulink and stateflow
if any(strfind((x)>4,[1 1 1 1 1])) V=10000; else V=1 end

14 years ago | 1

Answered
Simulating model in command window without using workspace.
<http://www.mathworks.com/support/tech-notes/1900/1903.html Command Line Functionality for Simulink>

14 years ago | 0

Answered
sampling audio signal
[x,fs] = wavread('file'); t = 0:1/fs:length(x); plot(t,x); for stereo files [y, fs]=wavread(fileName); % Read wave fil...

14 years ago | 1

Answered
GUI
<http://www.mathworks.com/matlabcentral/fileexchange/2378 Buttons>

14 years ago | 0

Answered
How do I run a simulation with a transfer function block and a multi dimensional input ?
I tested a model and found problems doing what you want, my workaround is: # Insert a sine wave block (f=2*pi*0.22 and phase=...

14 years ago | 0

| accepted

Answered
Shift plot indexing
A = [10 9 7 8 4 2 5 1 0; 10 12 6 8 3 3 4 2 0]; plot(0:size(A,2)-1,A');

14 years ago | 0

| accepted

Answered
Interactive Line Plot GUI
Take a look at <http://www.mathworks.com/matlabcentral/fileexchange/20645-ginput2-m-v3-1-nov-2009 ginput2>

14 years ago | 0

Answered
I can't get the ilaplace of a function
The documentation for the ilaplace says that ilaplace(L) computes the inverse Laplace transform of the *symbolic expression L*, ...

14 years ago | 0

Answered
Find
a=randi([1 10],10,2); %make up some data x=a(:,1); y=a(:,2); b=5; sum(y<x+b & y>x-b)

14 years ago | 0

Answered
How to make a unique vector
a = [22 20 21 20 24 25 26 22] %your vector b=unique(a); %get the unique ones d=perms(b); %get all possible permutations o...

14 years ago | 0

Answered
Bode
Besides Oleg suggestion, bode doesn't take double arguments, you must provide one transfer function instead. %simple example ...

14 years ago | 1

Answered
plotting of points
%generate some fake data similar to the picture 1 t=1:100; up=10+2*rand(1,45); desc=9-(1:10)*rand(1,1); down=1+2*r...

14 years ago | 0

Answered
Colorbar displays in new figure
Let me know if this is correct, you have the GUI open and you want to add the colorbar from a code on the command line? If th...

14 years ago | 0

Answered
Set cursor position in multiline uicontrol edit box
take a look at <http://undocumentedmatlab.com/blog/setting-line-position-in-edit-box-uicontrol/ Setting line position in an edit...

14 years ago | 0

Answered
Kalmanfilter
Sure you can, take a look on the <http://www.mathworks.com/matlabcentral/fileexchange/ FEX> for examples of the use of the Kalma...

14 years ago | 0

Answered
Passing figure data from fcn to plot in GUI
Why doesn't gcvplots return the data necessary to do the plots to the GUI and the code to plot goes inside the GUI? function...

14 years ago | 0

| accepted

Answered
Pulling handle from messagebox within GUI
I don't see a problem there because it works just fine uiwait(msgbox('Message')) or waitfor(msgbox('Message'))

14 years ago | 0

| accepted

Load more