Answered
Simulink random number repeats every time the simulation runs
Go to File, Model Properties, callbacks, InitFcn n=randi([1 3]) if you don't wan't to have repeated n values, first check if...

14 years ago | 0

Answered
Creating transfer function with a variable gain "k"
K=1:10 sys=K*H(s) %replace H(s) with your transfer function sys(1) is your system with gain K=1 and so on until sys(10) -> ...

14 years ago | 0

Answered
Why sym2poly function converts a random string to s polynomial?
The result [1 0] means that there's a symbolic variable with 1 for it's coefficient, the polynomial is: 1*cacd+0

14 years ago | 1

Answered
Calculating sin and cos functions
Those functions work in radians not degrees, try this cosd(45) sind(45)

14 years ago | 8

| accepted

Answered
A question about the freqz function
Try this way: [h,w]=freqz(zeros,poles,frequency vector,sampling frequency) plot(frequency vector,w)

14 years ago | 0

Answered
what is function fmain in matlab
I'm not aware of any MATLAB function called fmain but try this: which fmain %this will show where the function is %help ...

14 years ago | 0

Answered
continuous to discrete and plotting
clf hold on %continous response %TStart is the starting time of the step %TIncrement is the increment of the time...

14 years ago | 0

Answered
Euler angles calculation
<http://www.gregslabaugh.name/publications/euler.pdf Computing Euler angles from a rotation matrix>

14 years ago | 0

Answered
check the code for me, please
when you do load_database; you are just calling the function without saving the output, I guess you should do something sim...

14 years ago | 0

Answered
problem plotting on a graph
I don't understand your question but why don't you use subplots instead of creating new figures?

14 years ago | 0

Answered
Crusor position without click
<http://www.mathworks.com/matlabcentral/fileexchange/20892-display-cursor-location Display Cursor Location by Rodney Thomson> ...

14 years ago | 0

Answered
Why do you come to "MATLAB Answers"?
j. To waste time

14 years ago | 1

Answered
How to lift the X-axis on graph?
<http://www.mathworks.com/matlabcentral/fileexchange/22956-axescenter axescenter by Matt Fig>

14 years ago | 0

| accepted

Answered
replace a portion of a matrix
I(3,2:4)=5; I(2:4,5)=5;

14 years ago | 0

| accepted

Answered
Subtract combinations of variables in a vector
Here's a version with two for loops v=1:7; for a=1:7 for b=1:7 %comment the next line if you want the varia...

14 years ago | 0

Answered
question about the function of callback
If you have several pushbuttons each one with his own function, try this: hb = uicontrol('Style','pushbutton',... ...

14 years ago | 0

Answered
XTickLabel
<http://www.mathworks.com/matlabcentral/fileexchange/19059-myxticklabels MY_XTICKLABELS by Pekka Kumpulainen>

14 years ago | 1

| accepted

Answered
conversion from binary to decimal
item=bits(i,:));% item is a row gotten from the array named bits scale=bin2dec(item); Just removed those '', you want wh...

14 years ago | 0

Answered
semilogy function, and ylabel number
x=0:0.1:1000; s=semilogy(x,10.^x); YTL=get(gca,'YTickLabel'); set(gca,'YTickMode','manual'); set(gca,'YTickLabel',YTL)...

14 years ago | 0

Answered
Adding a GUI to existing code
Put all the code inside a function if you haven't already, create a figure to hold the buttons and other GUI objects, add your b...

14 years ago | 0

Answered
Ginput in a GUI
<http://www.mathworks.com/matlabcentral/answers/4773-determine-if-mouse-click-on-a-plot-is-within-plot-region Determine if mouse...

14 years ago | 0

Answered
How to set timer
function GuiFun fig=figure; GuiButton = uicontrol('Style','pushbutton','String','PushToStart',... 'Position',[315...

14 years ago | 0

Answered
figure won't come up after using plot
I had that problem in MATLAB 2008b for awhile, no clue what caused it and what fixed it, just put figure before the plot command...

14 years ago | 0

Answered
plotting in gui
If you are using GUIDE just do plot(handles.axes_row11,1,1); plot(handles.axes_row12,1,2);

14 years ago | 0

Answered
How to show full dialog box title
prompt={'Enter the matrix size for x^2:',... 'Enter the colormap name:'}; name='Input for Peaks function'; defau...

14 years ago | 3

| accepted

Answered
Plot like a "scope" block
Answer edited, looking better at the scope it looks like it does something like the ZOH block does, maybe this code can help you...

14 years ago | 0

Answered
pushbutton problem
Use the handles structure, in the OpeningFcn initialize variable n and x handles.n=1; handles.x=cell(1,1); % Update handl...

14 years ago | 0

| accepted

Answered
How to get the remainder of a division in Simulink?
in1---->|MUX|---->|Matlab Fcn |--->out in2---->| | |u(1) - fix(u(1)./u(2)).*u(2)| or in1---->|MU...

14 years ago | 0

Answered
Dynamically plot graphs to axes component
<http://www.mathworks.com/help/techdoc/ref/subplot.html Just use the subplot function> To remove all the subplots from your GUI...

14 years ago | 0

Answered
symbol from string
a='name' syms(a)

14 years ago | 0

| accepted

Load more