Answered
Implementing Cramer's method in MATLAB
I wonder how so many teachers give assignments to be solved in MATLAB without first teaching the MATLAB basics! <http://www...

15 years ago | 0

Answered
How do I automatically run code in a GUI upon startup?
put the code in the OpeningFcn

15 years ago | 0

| accepted

Answered
How do I save values entered in GUI text boxes as new defaults?
<http://blogs.mathworks.com/videos/2010/12/10/how-to-save-and-restore-state-of-a-gui-in-matlab/ How to save and restore state of...

15 years ago | 0

| accepted

Answered
Dynamic Plotting "Phantom" Line
Initialize p1 with this code p1=plot(nan,nan,'r-'); instead of p1=plot(r,nnn,'r-');

15 years ago | 1

| accepted

Question


How do I get the coefficients of this symbolic expression
This is the symbolic expression: (4525*Kd*s^2 + 4525*Kp*s + 4525*Ki) --------------------------------------------------...

15 years ago | 2 answers | 0

2

answers

Answered
Changing the boundary rows and columns.
m=[1,1,1,1; 1,1,1,1; 1,1,1,1]; m(:,1)=0; %all lines, first column m(1,:)=0; %all columns, first line m(:,size(m,2))=0; %...

15 years ago | 0

Answered
Solving equation
To get just ans=1 you need the Symbolic Math Toolbox™ syms a b simplify(((a+b)^2 -2*a*b -a^2)/b^2) ans = 1

15 years ago | 0

Answered
Clearing everything except variables
save MyWorkVars matlabrc load MyWorkVars delete(MyWorkVars) <http://www.mathworks.com/matlabcentral/answers/1093-how-do...

15 years ago | 0

Answered
How to solve this in matlab?
%pre-allocate the vectors for Xab and Kab Xab=zeros(1,na+nb-1); Kab=0*Xab; % can't decode this %?Xab.Kab for a=1:n...

15 years ago | 0

Answered
complete the square MuPad
I don't know if there's one function for that purpose but you can do it easily following this: %a*x^2+b*x+c %quadratic form...

15 years ago | 1

Answered
RLC equations
<http://www.mathworks.com/help/toolbox/simulink/ug/bra6ae8.html Best-Form Mathematical Models :: Modeling Best Practices (Simuli...

15 years ago | 1

| accepted

Answered
Reduce Grey Space around Images in a Figure
d=0.05; %distance between images moon = imread('moon.tif'); s1=subplot(121); imshow(moon); s2=subplot(122); ...

15 years ago | 0

Answered
Rescursion Limit Reach?
You have the spring function inside one m file called spring.m and the script that calls the spring function inside another file...

15 years ago | 0

Answered
Runge-Kutta 2
Have a look at <http://numericalmethods.eng.usf.edu/topics/runge_kutta_2nd_method.html this>, it includes matlab code and many t...

15 years ago | 0

Answered
Do you suffer from keyboard latency in this forum?
I notice no latency besides the one in my brain lol , the time it takes me to remember something is far greater than any possibl...

15 years ago | 1

Answered
TUTORIAL: how to ask a question (on Answers) and get a fast answer
* Don't accept your own answer unless it's really the correct answer and you posted the detailed solution and/or the code * Don...

15 years ago | 8

Answered
MuPad reduce roots
MuPad and Maple don't simplify it like you expect unless you do this: %matlab syntax z=sym('z','positive') simplify((z^3...

15 years ago | 2

| accepted

Answered
Problem using quantilenorm() with DataMatrix objects
You can't use the MATLAB sort function on those DataMatrix, at least not directly, see this functions sortcols %sort the colu...

15 years ago | 0

Answered
conversion
In MATLAB a "scalar" is a vector with just one element, for example [1] is the same as 1 here's a sneaky way to separate all th...

15 years ago | 0

| accepted

Answered
bit flipping
@Walter I was waiting for mahaveer to show some effort :( Just for the record here's my code: c=[1 0 1 1 1 0 1 0 0 0 ...

15 years ago | 3

| accepted

Answered
Writing a Function for Plotting
Your first part is wrong, please tell me how can you compare x with d without having x defined first? Please test your functio...

15 years ago | 1

| accepted

Answered
How to define a structure fieldname from a cell contains a string value?
select = [{'NAME'}, {'VALUE'}; {'alpha'}, 0.4; {'sigmaL'}, 1; ...

15 years ago | 0

Answered
Two Questions: Timer and Sound
1) Add one text box to your GUI to hold the t value (for example text1), tag it set(handles.text1,'Tag','MyTimerVal') In th...

15 years ago | 0

Answered
GUI
The GUIs built by GUIDE use the handles structure to share the handles for all the GUI objects, for example: handles.edit1 %t...

15 years ago | 2

| accepted

Answered
Have a function check whether a variable already exists in the base workspace
In a script you don't need the evalin because the variables are in the same scope as the workspace ones, in a function do this: ...

15 years ago | 1

Answered
How to change the step value of a for loop during execution
Here's a code that might work! Save this function function b=FindFirstAndLast(v) %v is a line vector (1xN) %the o...

15 years ago | 0

Answered
Storing values through a loop
Bd size is [1 60] and B is [1 60] so you cant store more than one Bd value inside B, please consider something like this B...

15 years ago | 0

Answered
Optimization Simple search
John code: function y= bubble(x,y) n = length(x); for k = 1:n-1 for j = 1:n-k if(x(j)> x(j+1)...

15 years ago | 0

Answered
How to move from one gui page to another by clicking push button?
Maybe your are looking for something like this <http://www.mathworks.com/matlabcentral/fileexchange/25938-multiple-tab-gui Multi...

15 years ago | 1

| accepted

Load more