Réponse apportée
Tic and Toc question
tStart = tic; for n=1:2000 n if toc(tStart)>=0.1 %100 miliseconds disp('time exceeded') ...

presque 15 ans il y a | 0

Réponse apportée
Delete Rows that have a negative number in their first column.
A=[-1 2;2 -4;-5 9;-3 7;8 6] %find the rows that we don't want, remove them and show the rest A(A(:,1)<0,:)=[] another wa...

presque 15 ans il y a | 3

| A accepté

Réponse apportée
How to read a file from a specific directory?
%assuming: %folder is a string with just the folder name, ex A %file is a string with just the file name file=[folder fi...

presque 15 ans il y a | 0

Réponse apportée
Function to find the more recurrent number
Another possible way a=randi([1 20],1,1000); u=unique(a); [C,I]=max(arrayfun(@(x)sum(a==u(x)),1:numel(u))); disp('The v...

presque 15 ans il y a | 0

Réponse apportée
for loop help
yet another way r=9; %number of repetitions of the sequence, ex 9, max is 89 b=[2 3 5 6 8 9]; %original se...

presque 15 ans il y a | 0

Réponse apportée
Plotting Linear Inequality AND triangles
Regarding the inequalities questions here's one example t=-10:0.01:10; %values on x axes f=t.^2-2; %values on y axes, ...

presque 15 ans il y a | 0

Réponse apportée
dir function help
perhaps the bar is the other one? dir('videos\*.jpg)

presque 15 ans il y a | 0

Réponse apportée
Replacing elements of a Matrix meeting conditional
%sample arrays a=randi([1 6],4,4); b=randi([1 6],4,4); e=a(:,1)==b(:,1); %find what elements are equal in first col...

presque 15 ans il y a | 0

Réponse apportée
partition of matrix element
b=dec2bin(100) BinArray=b-'0'

presque 15 ans il y a | 2

| A accepté

Réponse apportée
Simply Directory Question
m=dir([folder '\*.m']); files=arrayfun(@(x)m(x).name,1:numel(m),'uni',false); %or use Oleg suggestion

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Plotting graphs with two different Y-axis Values
doc plotyy

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Insert a colorbar on a GUI?
first select the current axes, just in case you have more than one axes on your gui, you also must have the handle for it (h=axe...

presque 15 ans il y a | 0

Réponse apportée
A beginners question to clarify something I am trying to do it MATLAB regarding an image
Simple code to show one image and each rgb components on different axes name='ngc6543a.jpg'; subplot(411) rgb = im...

presque 15 ans il y a | 0

Réponse apportée
Parsing a vector
a = [1 3 5 NaN 4 5 NaN 8 9] b=[0 find(isnan(a)) numel(a)+1] c=arrayfun(@(x)a(b(x)+1:b(x+1)-1),1:numel(b)-1,'uni',0) c(ce...

presque 15 ans il y a | 2

Réponse apportée
fast binomial random numbers
Try using the GUI from deploytool if you have it installed. or just mcc -m binom.m

presque 15 ans il y a | 1

Réponse apportée
PID controller in Simulink for airplanes
What's that output you limit? is it the vertical speed? or the control error? Those limits you have are reached when you have...

presque 15 ans il y a | 0

Réponse apportée
Display the error containing line in .m file
After you get the error, execute this l=lasterror; fprintf('The last error was on line %d of the file called %s \n',... ...

presque 15 ans il y a | 0

Réponse apportée
stimulus presentation
Please refer to this <http://www.mathworks.com/matlabcentral/answers/2081-how-to-execute-two-matlab-scripts-simultaneously How t...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
MATLAB GUI Workspace problem
Look at the documentation from the simset function, you can change the workspace from the default MATLAB Workspace to your own G...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
How to access parameters in histfit
I don't understand exactly what you want, maybe getting the coordinates of the curve? r = normrnd(10,1,100,1); hf=histfit(r...

presque 15 ans il y a | 3

Réponse apportée
Creating legend based on numeric array
My kludgy way: legendCell = eval(['{' sprintf('''N=%d'' ',N) '}'])

presque 15 ans il y a | 2

Réponse apportée
unsolved function
Both of those functions aren't avaiable from MATLAB instalation files, they are from some book or files, create them first or do...

presque 15 ans il y a | 0

Réponse apportée
Adding a subsystem using an m file
Simulink.BlockDiagram.createSubSystem(blocks) <http://www.mathworks.com/help/toolbox/simulink/slref/simulink.blockdiagram.c...

presque 15 ans il y a | 0

Réponse apportée
Floor function for int8
a=int8(floor(8.6))

presque 15 ans il y a | 0

Réponse apportée
after getting the equation for a plane, solving for z
use the <http://www.mathworks.com/help/toolbox/symbolic/subs.html subs> function or do like this start = [-13627.6 4904.1 ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Run m files by using GUI
m files can be scripts or functions, scripts (group of MATLAB statements) you just run them by writing their name, functions you...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
plotting using legend
<http://www.mathworks.com/support/solutions/en/data/1-181SJ/?solution=1-181SJ Is it possible to append lines to a legend in MATL...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Getting parity
code from your other question, fixed by me: num = 100; source = randint(num,2); r1 =source(1,:); r2 =source(2,:); parity...

presque 15 ans il y a | 0

Réponse apportée
Question about plotting, getting subvectors
vector(1:40) %get all values from index 1 to 40 Your mistake is that you just plot the value at index 40 with your code vecto...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
for loop
a(1,:) %first row a(2,:) %second row

presque 15 ans il y a | 0

| A accepté

Charger plus