Réponse apportée
manipulation of seperate vector values
%v is your vector idx=v<0; %get the index of all values lower than 0 idx1=v>0; %get the index of all values higher than 0 ...

presque 15 ans il y a | 1

Réponse apportée
Does MATLAB R2010b have a symbolic math toolbox?
<http://www.mathworks.com/help/toolbox/symbolic/rn/bsllh45-1.html yes>

presque 15 ans il y a | 0

Réponse apportée
import .txt data
uiimport

presque 15 ans il y a | 0

Réponse apportée
save plot on axes as a fig file for later use
saveas(handles.axes1,'axes1.fig','fig');

presque 15 ans il y a | 0

Réponse apportée
local minima
[C,I] = min(y) %C is the value and I is the index x(I) %gives the x value of the local minima

presque 15 ans il y a | 0

Réponse apportée
Design Iterative PID Tuner using MATLAB and Simulink
%this code saves the PID values that you want (max(Position)<10) %and also max(Position) in the array GoodValues GoodValue...

presque 15 ans il y a | 0

Réponse apportée
Transfer function
S = v1: [1x1 sym] y: [1x1 sym] There no v2 in the solution so S.v2 gives the error If you want S.v2 syms s ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Initial conditions
Maybe something like the Model Info block but with your initial condition variables, you have to put the same variables inside t...

presque 15 ans il y a | 0

Réponse apportée
Useful strategy to vote questions and answers
Another question about votes?! why are you and others begging for votes every day?! I may seem to be rude or impolite but c'mon ...

presque 15 ans il y a | 0

Réponse apportée
Are we voting enough?
Encourage voting?! really?! I fail to understand why people give such importance to votes, we are here mainly to learn with each...

presque 15 ans il y a | 1

Réponse apportée
Substitute for factors of a variable but not the variable itself
a=sym('1+e^2=1'); if a==sym('1+e^2=1') %or strcmp(char(a),'1+e^2=1') disp('the expressions are equal!!!!') a=sym('1+0=1'...

presque 15 ans il y a | 0

Réponse apportée
from workspace to m.file
if your m file is just code (not a function) the variables are in the same scope as the worspace, you just need to call them lik...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
how to make a polar plot line continuous between end and beginning
example hold on t = 0:.01:pi; h1=polar(t,2*t,'--r') t1=t(1); [THETA,RHO] = pol2cart(t1,2*t1) %last t2=t(end); [TH...

presque 15 ans il y a | 0

Réponse apportée
Vector problem
a=[ 0 0; 1 0 ; 1 0 ; 1 1 ; 1 0] %inputs c=zeros(size(a,1),3); %pre-allocate table c(:,1:2)=a; %put the inputs on the table...

presque 15 ans il y a | 1

Réponse apportée
How to handle 'NaN' values
errors(isnan(errors))=0

presque 15 ans il y a | 4

| A accepté

Réponse apportée
How can I use attribute GLOBAL efficiently?
The way you should always work with is: function [y,a]=y(x) if you still want to use global variables you must declare t...

presque 15 ans il y a | 0

Réponse apportée
How to plot a time-delayed ersion of a signal ??
x=0:0.01:2*pi y=cos(x) plot(x,y) hold on d=2; y=[ones(1,d)*nan y(1:end-d)]; plot(x,y,'r') legend('signal'...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
How to learnt matrix element index...
m=[10 11 12 13 14 15 4 5 6 45 55 65] [r,c]=find(m==5)

presque 15 ans il y a | 1

Réponse apportée
steady state error command
SP=5; %input value, if you put 1 then is the same as step(sys) [y,t]=step(SP*sys); %get the response of the system to a step...

presque 15 ans il y a | 11

Réponse apportée
How to plot functions
One way to do it ezplot('y=1 + exp(-0.2*x)*sin(x+2)')

presque 15 ans il y a | 0

Réponse apportée
Turning on grid on ltiviewer
%brute force way, it turns on the grids for all axes ha=findobj('type','axes') arrayfun(@(x)set(x,'XGrid','on'),ha) ar...

presque 15 ans il y a | 1

Réponse apportée
Plot a subplot with hold on and hold off in a loop without always calling xlabel, ylabel, xlim, etc
delete(findobj(gca,'Type','line')) %delete all the lines from gca %all other axis properties should remain the same, only t...

presque 15 ans il y a | 0

Réponse apportée
Help simulink
File->Model Properties->Callbacks->StopFcn Put the name of the m file in the StopFcn, that way your code will run right after...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
How to COnvert a simulink model to a matlab code or .m file ?
sorry but that's not possible

presque 15 ans il y a | 1

Réponse apportée
Saving an Axes component
<http://www.mathworks.com/matlabcentral/newsreader/view_thread/301782 The final solution might work>

presque 15 ans il y a | 0

Réponse apportée
How to add a title and logo to a figure with multiple plots?
clf subplot(211) plot(1,1,'*') title('one') subplot(212) plot(2,2,'*') title('two') axh=get(gcf,'Children...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
how to find highest intesity value point from a given matrix
%supposing a is your matrix [value, index]=max(max(a))

presque 15 ans il y a | 0

| A accepté

Question


When opening GUI with GUIDE I get errors and a weird behavior
I made a GUI with GUIDE, all was working fine until today when I was going to do some changes to it, although working fine when ...

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

2

réponses

Réponse apportée
concatenate
a=[] for b=1:10 a=[a b] %replace the b with the data you want to store per iteration end a %result is inside thi...

presque 15 ans il y a | 0

Réponse apportée
Plotting help
replace figure(2) by hold on

presque 15 ans il y a | 0

| A accepté

Charger plus