Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
How do I automatically run code in a GUI upon startup?
put the code in the OpeningFcn

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Dynamic Plotting "Phantom" Line
Initialize p1 with this code p1=plot(nan,nan,'r-'); instead of p1=plot(r,nnn,'r-');

presque 15 ans il y a | 1

| A accepté

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

presque 15 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
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; %...

presque 15 ans il y a | 0

Réponse apportée
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

presque 15 ans il y a | 0

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

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 1

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

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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); ...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 1

Réponse apportée
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...

presque 15 ans il y a | 8

Réponse apportée
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...

presque 15 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 15 ans il y a | 3

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 1

| A accepté

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

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
GUI
The GUIs built by GUIDE use the handles structure to share the handles for all the GUI objects, for example: handles.edit1 %t...

presque 15 ans il y a | 2

| A accepté

Réponse apportée
Where is the example directory in R2011a (using a Macintosh)?
path

presque 15 ans il y a | 0

Réponse apportée
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: ...

presque 15 ans il y a | 1

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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)...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 1

| A accepté

Charger plus