Réponse apportée
legend plotting help with for loop
Something similar to this: hold on mark = {'*-r','o-g','^-b','*-k','*-c','*-r'}; for i = 1 : 6 %loads intern...

presque 15 ans il y a | 0

Réponse apportée
create array
a=zeros(3,6624); for b=1:size(a,2) c(1)=rand/3; c(2)=rand/3; c(3)=1-c(1)-c(2); cr=randperm(3); a(:,b)=[c(cr(1));c(...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
fprinf format
x=[1,2,3] y=[4,5,6] z=[7,8,9] FileName='results'; FID = fopen(FileName, 'w'); if FID < 0, error('Cannot open file');...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Any idea on how to create a n by n square matrix.
v=1:npanels; C=reshape(cell2mat(arrayfun(@(v)(y(v).*dP)./((x(v)-P).^2+(y(v).^2)),... v,'uni',false)),npanels,npanels)';

presque 15 ans il y a | 2

| A accepté

Réponse apportée
What does this print out?
it never prints, the condition is false do this before the loop b<a %replacing b and a by their first values you get 3<1 ...

presque 15 ans il y a | 0

Réponse apportée
Vector
.^ instead of ^

presque 15 ans il y a | 1

| A accepté

Réponse apportée
save variables gui
Make sure that YourFigureNumber is really one handle to a figure, figure1 usually works to specify the GUI figure handle.

presque 15 ans il y a | 0

Réponse apportée
Count the frequency of a number in a series of numbers.
doc histc example a=[1 2 3 4 5 6 1 2 6 6 6]; [n,bin]=histc(a,1:6); n is the frequency and bin is the number example:...

presque 15 ans il y a | 0

Réponse apportée
Solving a math problem with two unknowns using matlab (linear least square/optimization)
I=[-7.02 -7.84 -6.27 -7.33]; D=[-49.600 -0.2213 -68.809 -0.2213 -63.307 -0.1510 -65.438 -0.1468]; s=D...

presque 15 ans il y a | 0

Réponse apportée
random pick cell array
x=[1;8;9;10;16]; %is one array not cell array x(randi([1 numel(x)])) %show one random element of the array

presque 15 ans il y a | 0

Réponse apportée
Passing datenum a column vector?
d=[19961016 19961017 19961018 19961021 19961022 19961023 19961024]; d=num2str(d)-0; Y=str2num(char...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Help! About use symsum on matrix
Your are missing a dot before the exponent rt=symsum((p.^t)*yu,t,0,m);

presque 15 ans il y a | 0

Réponse apportée
Indexing
I0=find(x==0) I30=find(x==-30)

presque 15 ans il y a | 1

| A accepté

Réponse apportée
unable to plot
If MATLAB doesn't throw out errors when running that code that's because you are loading something correctly, please look at the...

presque 15 ans il y a | 0

Réponse apportée
load multiple files in a loop
for i = 1 : k(1) variable(i) = load(sprintf('internalforce_%d',i)) end

presque 15 ans il y a | 0

| A accepté

Réponse apportée
concatenate structs in a loop
for n=1:size(A,1) s{n}=cat(2,A(n,1).B, A(n,2).B, A(n,3).B, A(n,4).B, A(n,5).B, A(n,6).B, A(n,7).B); end

presque 15 ans il y a | 0

Réponse apportée
Add standalone executable to windows programs menu on installation
<http://www.jrsoftware.org/isinfo.php Inno Setup>

presque 15 ans il y a | 0

Réponse apportée
Save disp output as a string/cell variable
MyVariable=evalc('disp(MyThingToShow)')

presque 15 ans il y a | 8

| A accepté

Réponse apportée
Sort a matrix without using the sort function
[row,column]=size(a); for nc=1:column for nr=1:row [C,I]=max(a(nr:row,nc)); b=a(nr,nc); ...

presque 15 ans il y a | 0

Réponse apportée
Is there a way to uninstall standalone executables after installing them on a user's computer?
It's not one regular installation, the files are all contained in the same folder so just delete them.

presque 15 ans il y a | 0

Réponse apportée
i need to read matrix from a png file
for ni=1:3 I{ni}= imread(sprintf('image%s.png',num2str(ni))); end limit=-1; while (limit<0) | (limit>50) disp...

presque 15 ans il y a | 0

Réponse apportée
Plotting ECG signals
doc fft %the documentation example is very good <http://stackoverflow.com/questions/1773542/matlab-filter-noisy-ekg-signal Go...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
while loop, user-defined function, to find prime numbers
Vectorized versions: function pr=prime(n) %just makes a vector with all prime numbers from 1 to n %no error check, I leav...

presque 15 ans il y a | 0

Réponse apportée
Find max of matrix without using built in function.
mx=a(1); for p=2:numel(a) if a(p)>mx mx=a(p); end end mx %the maximum value

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Opening default browser
system('start www.google.com')

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Use elseif inside a case switch. What is Wrong with my code? Only the first "if" case only works none of the elseif work?? Please any advice would help.
This condition elseif 7<rp<=27; is valid for rp=27 so why do you have this one elseif rp==27; after it?

presque 15 ans il y a | 0

Réponse apportée
what does this code mean?
. before operation means that the operation is element wise [a b].*[c d]=[a*c b*d] ' means transpose (columns turn into rows a...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Callback and evalin
The evalin is evaluating the argument X in the workspace but X only exists in your current function, try like this evalin('ba...

presque 15 ans il y a | 0

Réponse apportée
about ztrans command?
ztrans is a function from the Symbolic Math Toolbox™, you must have that toolbox installed and with a valid licence.

presque 15 ans il y a | 0

Réponse apportée
Matlab gives me a formula when i want a value
eval(Wi)

presque 15 ans il y a | 2

Charger plus