Réponse apportée
Generating array of data using for-end looping
Another non-loop alternative (edit logspace): mylogspace = @(x1,x2,n) 10.^ [x1+(0:n-2)*(x2-x1)/(n-1), x2] mylogspace(0,9.5,...

environ 15 ans il y a | 1

Réponse apportée
.p type files
.p files are encrypted files where the plaintext cannot be read or modified. If you were given a pcode file, it is because the ...

environ 15 ans il y a | 1

Réponse apportée
How to vectorize vector indexing?
Another approach: % Data A = [1 2 3 4; 5 6 7 8; 9 10 11 12]; c = [2 3 1]; %Extraction: ...

environ 15 ans il y a | 4

| A accepté

Réponse apportée
How to colorize individual bar in bar3
Never say never! Y=[ 1 2 3 ; 4 5 6 ; 3 4 5]; h = bar3(Y); cm = get(gcf,'colormap'); % Use the current colormap. cnt...

environ 15 ans il y a | 11

| A accepté

Réponse apportée
MATLAB code help
First thing is to read what comes up when you type this: docsearch('M-file function')

environ 15 ans il y a | 0

Réponse apportée
sinc function
x = -20:0.0001:20; y = (sin(pi*x))./(pi*x); y(x==0) = 1;% If you don't get: (Warning: Divide by zero.) you missed 0. plo...

environ 15 ans il y a | 2

| A accepté

Réponse apportée
Do you suffer from keyboard latency in this forum?
I do have such issues, but very inconsistently. Over the last few days it has been driving me nuts. For a few weeks before tha...

environ 15 ans il y a | 1

Réponse apportée
How to plot lines between all these points
Does this do what you need? V(6,:) = V(1,:); % To connect at the end. Assumes size(V,1) = 5; line(V(:,1),V(:,2))

environ 15 ans il y a | 0

| A accepté

Réponse apportée
How to replace zeros with other value in a big matrix fast
Don't double call these functions (MAX,MIN,SUM,MEAN,etc.). Learn to use the colon, it is your friend! A(~A(:))=mean(A(:)); ...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Help with speciality dice simulator
From what I can understand, your code could become: function [DieResult Special] = t6(n) D = floor(rand(1,n)*6) + 1;...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
retrieving data from a gui
There are many ways to do what you want here. First though, using VARARGOUT does not do what you think it does in this callback...

environ 15 ans il y a | 1

Réponse apportée
inserting headers into a vector
Boris, please format your code and fix the errors. When I tried to copy and paste your code, it looks like you are missing some...

environ 15 ans il y a | 0

Réponse apportée
Validation of a date with a given format
try D = datenum(Inpt,'dd mmm yyyy HH:MM:SS.FFF') catch error('Incorrect Format') end

environ 15 ans il y a | 3

Réponse apportée
matlab data parsing help- pulling only certain characters
Also, Rs = cellfun(@(x) x(21:35),quat1,'Un',0); To convert to doubles, use: Rd = cellfun(@(x) str2double(x(21:35)),qu...

environ 15 ans il y a | 0

Réponse apportée
what is wrong in this code in matlab?
You probably mean to use the SQRT function to find the square root. In response to your clarifying comment, sqr = @(x) x.^...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Numeric solution of a transcendental equation
Please format your code using the {} Code button so that it is readable. Using the modified version of your function below (m...

environ 15 ans il y a | 0

Réponse apportée
passing data into another gui figure window using guide
Did you look at the responses you got to the exact same question here: <http://www.mathworks.com/matlabcentral/answers/5447-p...

environ 15 ans il y a | 0

Réponse apportée
plotting a graph from Mat files.
What does that mean? Does it mean you want to load some of the data stored in a .mat file and then plot that data?

environ 15 ans il y a | 0

Réponse apportée
Is this a switchyarding case?
Here is an example. function [] = Check_examp() % Print to screen the users checkbox choices. S.fh = figure('units','pix...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Generating scalars from Approximate values
Is your matrix actually a row vector? I hope so, or you will have to clarify how an n-by-4 array is to approximate a 1-by-4 vec...

environ 15 ans il y a | 0

Réponse apportée
Efficient way to split a vector into Matrix
IDX = ones(3,5,'single'); IDX(:,1) = 1:3; D = B(cumsum(IDX,2)) Or, to match your functional form: function m_Arr...

environ 15 ans il y a | 1

Réponse apportée
nice boxes for great linewidths
I don't have the correct toolbox so I cannot test these ideas, but two come to mind. I assume that what looks like blue lines i...

environ 15 ans il y a | 2

Réponse apportée
Norm of the difference of each row of two matrices of different dimensions
Did you properly pre-allocate d before the loop? This would be your largest time killer if not... Also, your example loops don...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Imaginary number to a power
No problem here: clear i correct_answer = i^3 % Verify this first! for ii = 1:100000, if ~isequal(i^3,correct_an...

environ 15 ans il y a | 1

Réponse apportée
indexing in nested loop
You might consider a loop counter or two: cnt1 = 0; cnt2 = 0; for a=1:5:101 cnt1 = cnt1 + 1; for b=1:20 ...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
passing data between two different gui window using guide
From the second GUI callback which needs the data, simply use: H = findall(0,'tag','myeditboxtag'); Where myeditboxtag i...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Determine the exponential function
To expand on and reinforce Sean de's comment: Simply pasting a homework problem here will not result in its solution. There ar...

environ 15 ans il y a | 0

Réponse apportée
Matrix Averaging
If A is your matrix and tol stands for "a certain average," if mean(A(:,1))<tol M = mean(A(:,2:5)); end

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Problem with matlab editor
I don't know what happened to alter this behavior. Does the same thing happen when you have the editor window up and hit ctrl+n...

environ 15 ans il y a | 0

Réponse apportée
Confused: GUI / figure /
The reason why the third attempt doesn't find the GUI is that GUIDE GUIs have their figure handle visibility set to 'callback' s...

environ 15 ans il y a | 1

| A accepté

Charger plus