Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
A=randint(10,18,[1 12])
for m=1:10
s=1;
for i=1:6
for k=1:3
M(i,k)=A(m,s);
s=s+1;
end
end
M
end
Here in the output all the matrix is printed with the same name 'M'.
But i need to give different names to all the matrix.
Is it possible...
The above code works well. The 'Back' gives the matrix in a single row but the problem is when I'm giving a matrix with ex.6 rows I'm not able to get the whole matrix back in the previous format.
For Ex.
A=[1 2 3 4 5 6 7 8 9
3 5 6 8 2 1 10 2 3
6 7 6 8 9...
I want to replace repeated value with any other value in between 1 to 12.
Also is it possible to do like this:
A matrix given as:
[1 4 5
5 5 5
6 7 12]
Here a row should not contain all same value like here '5'. It can repeat twice in a row but should not thrice. It must take any value...
Given a matrix:[3 4 4 2 8 9 5 12 11 11 9 7]
Then how can we replace the repeated value with another one? For ex. 4 is repeated two times...so can this matrix be replaced as non-repeated values like
[3 4 5 2 8 9 5 12 11 1 9 7]?
How to modify it? Please help me out.
Thanks.
In a mesh network can all the nodes having multiple radios be assigned the same channel number? Is there any constraint regarding that?
What about the interference for such a network?
pls let me know.
Thanks.
what is happening here...for the above code i'm giving this matrix:
a=[9 8 9 2 3 12 4 5 9 12 8 2 12 5 9 11 11 4]
b=unique(a);
[b m n]=unique(a);
counts=accumarray(n(:),1)
for k=1:numel(counts)
fprintf('the value %d appears %d times in a\n',...
b(k),counts(k));
end
q = 0; r = 0; s = 0...
how can i give matrix as input arguments? that is each time i need to give a different matrix from command window. how can i do that?
Also i need to make this whole program come under one function.
pls help me.
Thanks.
Help me out of this code please!
This is my program
a=[2 3 7 1 4 2 1 16 8 2 5 9 15 10 12 1 26 6];
b=unique(a);
[b m n]=unique(a);
counts=accumarray(n(:),1)
for k=1:numel(counts)
fprintf('the value %d appears %d times in a\n',...
b(k),counts(k));
end
q = 0; r = 0; s = 0; t = 0; u = 0; v...
I'm working with PSO algorithm. This is the code, i want the output to be added and give a value.
a=[2 3 7 1 4 2 1 2 8 2 5 9 2 10 12 1 2 6];
b=unique(a);
[b m n]=unique(a);
counts=accumarray(n(:),1)
for k=1:numel(counts)
fprintf('the value %d appears %d times in a\n'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.