Réponse apportée
help to multiply matrices in succession
% For example: C = randi(10,2,2,3) A = cumprod(C,3) Or perhaps you meant: A(:,:,1) = C(:,:,1); for ii = 2:s...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How to remove the blue toolbar around the MATLAB figure.
figure('menubar','none')

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Specialized sorting of array while preserving order
% Your original array a = [19 21 12 -15 18 1 22 11]; % Now the method: L = length(a)/2; [~,J] = sort(a); % For ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Edit plot in a GUI
# What edits are you wanting the user to make? # Are you using GUIDE or an M-file?

plus de 13 ans il y a | 0

Réponse apportée
Need help figuring out what I am doing wrong with my graph
What is the difference between the two graphs? The spaces between the bars? The title? The boldness of the lines? Be more sp...

plus de 13 ans il y a | 0

Réponse apportée
What is the correct way to use arrays with function inside for loop?
If you want to hold y as a vector, then for every x(i) in the loop your function call will return a vector. You cannot store a ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Why won't my GUI code work!?
What is in the popup menu? To see this, take the semicolon off of the line where you retrieve the string, like this: str...

plus de 13 ans il y a | 0

Réponse apportée
Some issues with a basic while loop problem, help appreciated
Try this out. product=1; n=0; while product <= 500 num(n+1)=input('Enter a positive number '); ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Determination of y coordinate of a curve that intersects x axis ?
Where the curve intersects the x-axis, the y-coordinate is zero. No need to do anything with MATLAB.

plus de 13 ans il y a | 1

Réponse apportée
how to change value of xlswrite array using one-item vector
Here is an example of how to manipulate strings in a loop... Str = 'A'; for ii = 1:5 disp(sprintf('A%i',ii)) ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How can I plot a 3D histogram using hist3 with log scale?
x = 1:20; y = 2*x; hist3([x' y']); S = findobj('type','surf'); ZD = get(S,'zdata'); ZD(~ZD) = .1; set(S,'zda...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Unwanted mesh overlapping with surface
set(gcf,'renderer','zbuffer') % Or painters This is yet another opengl problem...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
error checking in matlab
When asking a question, you need to explain what you post. What is m and n? Are they supposed to be the size of x, like: [m...

plus de 13 ans il y a | 0

Réponse apportée
move a marker from one position to another in a curve plotted in a graph
Have you considered using the data cursor? plot(1:10) datacursormode on Now click on the line then use the arrow ke...

plus de 13 ans il y a | 0

Réponse apportée
Plotting two loglog y-axes
AX = plotyy(x,y1,x,y2); set(AX,'yscale','log') % And maybe xscale too?

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
make column in a matrix: 1,1,1,2,2,2,3,3,3 etc
A(:,2) = reshape(cumsum(ones(3,7),2),21,1); or A(:,2) = floor(linspace(1,7.7,21));

plus de 13 ans il y a | 1

Réponse apportée
switch function case{name}
This might be a case where a little pushbutton input GUI would be of service. For exmaple, save this as gui_input then call it ...

plus de 13 ans il y a | 0

Réponse apportée
what does this code mean?
It appears to be finding the ratio of the mean values of two 15 element square subarrays, each from a different array.

plus de 13 ans il y a | 1

Réponse apportée
Point at which max occurs
It is always a good idea to read the doc for any such question: doc max docsearch('maximum value') The two output cal...

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
Replace percentage of existing values with new value
B(randperm(16,4)) = 5

plus de 13 ans il y a | 0

Réponse apportée
Simplifying boolean function using boolean algebra
>> syms A B C D >> simplify((1-A)*B*C*D + A*(1-B)*C*(1-D) + A*(1-B)*C*D +... A*B*(1-C)*D + A*B*C*(1-D) + A*B...

plus de 13 ans il y a | 0

Réponse apportée
How to get a very small value rather than 0?
Use the symbolic toolbox if you need more precision than double.

plus de 13 ans il y a | 0

Réponse apportée
How can I link a scroll-bar GUI with the mathematical code I have written?
Here is an example GUI that does something similar. You should be able to adapt it fairly easily... function [S] = gui_s...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How can I make a string entered in an "Edit Text" box become a variable?
Here is one example that shows the process of manipulating data from edit boxes. function [] = gui_edits() % How to ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Who do I create a sequence of matrices?
This will do the job. Note that all of the matrices are there, but _they are in a different order_. You can figure out how to ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Create a loop which fills numbers 1-7 into matrix until matrix length reached
Andrei has shown you a preferred method. However, in answer to your original question, here is one way to solve it with a doubl...

plus de 13 ans il y a | 0

Réponse apportée
From 2 vectors of n elements To n points
P = [A,B]; Now point 1 is P(1,:). Point 2 is P(2,:), etc.

plus de 13 ans il y a | 0

Réponse apportée
Number of zeros in a matrix
The number of zeros in the matrix A is: sum(~A(:)) So we can make this a function: f = @(x) sum(~x(:)); Now test...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Is there a better way to randomly generate a Doubly Stochastic Matrix?
This looks promising. I have kept some notes in the comments so you can see what I was doing... There are three lines of cod...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
I need to know how matlab do A(B) where A and B are 2 vectors
I believe that these basic things are done just like you show, but in *compiled C-code.* Thus it is much faster that using inte...

plus de 13 ans il y a | 0

Charger plus