Dear all,
I want to generate all combinations of 0 1 in Matlab.
For example,
a=[0 0 0];
b=[1 1 1];
and I need answer as
Ans=
[0 0 0
0 0 1
0 10
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1]
Thank you
yeah, can't think of anything simpler than:
de2bi(0:7)
or if you want it in the order you typed it in:
sortrows(de2bi(0:7))
t=[0 0 0 ; 1 1 1];
n=length(t);
result=bsxfun(@times, [0,1,0], dec2bin(2^n-1:-1:0)-'0')
Dear manoj,
Thanks, But I am not getting results as per my need.
Your code is given following answer
result =
0 1 0
0 0 0
I think this may help you:
http://www.mathworks.co.uk/help/comm/ref/de2bi.html
Dear Ghanasyam
Rahul G. Waghmare is given the correct code for your suitable output.
Instead of Num_of _bits=2 you put 2 as 3 and finally you will the answer
Dear Rahul G. Waghmare,
Your answer is working as per my need.
Thanks ones again
Dear Pete R Jones,
Your answer is an alternate solution, It can be used with some addition command.
Almost all the optimization algorithms considers Function Evaluations to compare performance among various algorithms. Do Function Evaluations number is the most important criteria? If yes/no why?
10 November 2017 1,516 18 View
Recently, University Grants Commission (UGC), Government of India approved more than 44000 journals (http://www.ugc.ac.in/journallist/). This list has the inclusion of a large number of predatory,...
07 August 2017 7,287 33 View
Dear all, A smart war against corruption and terror, put up by Government of India. Will it strike on Black money makers? Can we stop corruption? Does it resist terror? What...
10 November 2016 4,606 36 View
Dear all, Most of the research papers are showing academic applications of the various truss structure. I would be glad if you please share some real world examples of various truss structures (as...
06 July 2016 4,536 26 View
In our society one day publication (submission and publication can be done in a day) and publication with reputed journals (Thomson Reuters, which takes months (or years)) have no big difference...
02 March 2016 7,960 67 View
Dear all, Please share your view and relevant materials for symbolic regression in optimization methods. Thanks
02 March 2016 1,747 5 View
Now a day large number of international journals offer speedy publication (by next day/week) with various types of impact factor / indexing. Such, journals are not checking plagiarism, originality...
06 July 2015 8,483 33 View
Dear Friends, How to check grammar and language of the research paper writer by non native English speakers.
05 June 2015 9,005 5 View
Dear all, I am looking for study material and basics of composite unconstrained benchmark functions. I have gone through many research papers. Composite functions are stated in various research...
03 April 2015 5,746 4 View
Dear all, I am new to Latex hence seeking for your valuable. I have three equations that need to convert in LaTex to submit my research paper. This equations are converted in LaTex (double column...
03 April 2015 8,075 1 View
I would like to understand potential safety concerns while handling SEB in the lab. Especially while working in animal house facility. Would like to know precautions for handling. Sigma MSDS...
07 August 2024 6,034 3 View
During low-temperature testing, new diffraction peaks that appear could be indicative of several phenomena. In one of our tests, we observed notable new peaks around 40° and 45° in a specific...
06 August 2024 726 3 View
Is it possible to conduct a molecular dynamics simulation to see the effects of a specific carbohydrate on the structure of lipids (e.g., micelle structure)? I am a beginner in this field and plan...
03 August 2024 3,371 3 View
I am using a windows system, what software I should use for hydration shell analysis with molecular dynamics?
02 August 2024 3,143 4 View
Can we patent a process flow diagram developed using a process simulator but no actual cases is carried out? For example consider a process for certain product manufacture where a new process flow...
31 July 2024 781 1 View
I am new to Micromechanics and having similar problem with understanding the implementation of the formula's. I would appreciate if anyone can guide me on how to go about getting a scalar value...
30 July 2024 969 0 View
Some Staphylococcus aureus strains Inhibit the growth of Mycobacteria in Mueller Hinton Agar medium containing 10% OADC. Do some Staphylococcus aureus strains have in vitro antimycobacterial activity?
29 July 2024 10,023 2 View
Dear All Gromacs User I would like to restart MD without using checkpint .cpt files? I heard there is a way for acheiveing this. Any input and sugegstions are most welcome. Thanking You Budheswar
29 July 2024 3,084 8 View
If I want to calculate molecular dynamics (Gromacs), do I first need to optimize the geometry of the molecule? For example, I first draw the molecule in Avogadro, and then what? I guess I can't...
28 July 2024 673 3 View
Please, what is the memory consumption of the Matlab function quad tree decomposition procedure [S = qtdecomp(I)] with respect to the input set I?
27 July 2024 5,455 2 View