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

15 years ago | 1

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

15 years ago | 0

Answered
import .txt data
uiimport

15 years ago | 0

Answered
save plot on axes as a fig file for later use
saveas(handles.axes1,'axes1.fig','fig');

15 years ago | 0

Answered
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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 1

| accepted

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 1

Answered
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'...

15 years ago | 0

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

15 years ago | 0

| accepted

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

15 years ago | 0

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

15 years ago | 1

Answered
How to handle 'NaN' values
errors(isnan(errors))=0

15 years ago | 4

| accepted

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

15 years ago | 0

Answered
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'...

15 years ago | 1

| accepted

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

15 years ago | 1

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

15 years ago | 11

Answered
How to plot functions
One way to do it ezplot('y=1 + exp(-0.2*x)*sin(x+2)')

15 years ago | 0

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

15 years ago | 1

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

15 years ago | 0

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

15 years ago | 0

| accepted

Answered
How to COnvert a simulink model to a matlab code or .m file ?
sorry but that's not possible

15 years ago | 1

Answered
Saving an Axes component
<http://www.mathworks.com/matlabcentral/newsreader/view_thread/301782 The final solution might work>

15 years ago | 0

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

15 years ago | 0

| accepted

Answered
how to find highest intesity value point from a given matrix
%supposing a is your matrix [value, index]=max(max(a))

15 years ago | 0

| accepted

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

15 years ago | 2 answers | 0

2

answers

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

15 years ago | 0

Answered
Plotting help
replace figure(2) by hold on

15 years ago | 0

| accepted

Load more