Answered
Significant figures are being trimmed when I read from a .txt file
Your data is there, this is just a question of how it is displayed. Read the <http://www.mathworks.com/help/matlab/ref/format.ht...

10 years ago | 1

Answered
How to create all range of given vector (possible permutations)?
Use Jos' FEX submission <http://www.mathworks.com/matlabcentral/fileexchange/7147-permn-v--n--k- |permn|>: >> permn([0,1],2...

10 years ago | 0

Answered
Moving the contents in the cell array
>> data = {'abc' , 'def' , 'ghi'}; >> data(4:6) = data; >> data(1:3) = {[]} data = [] [] [] 'abc' ...

10 years ago | 2

Answered
Whqt's the alternative of the function symmmd ?
<http://www.mathworks.com/help/matlab/ref/symamd.html>

10 years ago | 0

| accepted

Answered
Duplicate elements in array n times, where n is an array itself
If you have MATLAB 2015a or more recent, then use <http://de.mathworks.com/help/matlab/ref/repelem.html |repelem|>: >> repel...

10 years ago | 3

| accepted

Answered
Problem in Debugging matlab function
This really is very simple: # Place another breakpoint just after the loop. # When the debugger reaches the loop, run <http:...

10 years ago | 0

Answered
Create a hemisphere with slats
There is no need to write ugly, slow code using loops. MATLAB code is much more beautiful than that! This should get you started...

10 years ago | 0

| accepted

Answered
sprintf to cell array
Read this blog, it shows _lots_ of ways of doing this, and also introduces the fastest method of all (which is undocumented, so ...

10 years ago | 0

| accepted

Answered
How to delete consecutive values in a vector and to save just the biggest one?
If the sequences are integer and increasing only: >> a = [1,2,3,7,10,11,12]; >> x = [diff(a)~=1,true]; >> a(x) ans...

10 years ago | 1

| accepted

Answered
operations on structer under specific conditions ?
Rather than writing slow and ugly loops, you could simply use |bsxfun|: do = 0.9; S = struct(... 'xd',num2cell(ra...

10 years ago | 0

Answered
How I'm able to search for a variable in different functions and scripts?
MATLAB finds any string in any text files (not quite one button click): * Ribbon: "Home" tab -> "Find Files". Have you tri...

10 years ago | 2

Answered
calling the function dynamically - is it possible using eval or evalin
*The best solution* would be to learn how to use function handles, and then simply create the cell array to have function handle...

10 years ago | 8

| accepted

Answered
Is it possible to stack tables?
As far as I can tell, tables are limited to two dimensions. Here are some ideas for storing an arbitrary set of data of arbitrar...

10 years ago | 1

| accepted

Answered
Problem finding find command
<http://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating point numbers> are how decimal values are...

10 years ago | 1

Answered
Connect data vertically.
Why waste your time _fighting_ MATLAB with loops and other ugly pieces of code, when you can learn to _use_ MATLAB. Plotting the...

10 years ago | 0

Answered
Distance Between Characters in String
>> 'hello' - 'abcde' ans = 7 3 9 8 10 Explanation: in MATLAB character arrays are arrays just lik...

10 years ago | 0

| accepted

Answered
How to create a vector from two vectors?
If you have MATLAB 2015a or more recent then use <http://www.mathworks.com/help/matlab/ref/repelem.html |repelem|>: repelem(...

10 years ago | 1

| accepted

Answered
How to open a Nested Cell Array, when cells have parent-child relation in MATLAB
This does the same as your code, and it will be much faster: function p = getParent2(prnt) p = [prnt(1,:).parents]; p...

10 years ago | 1

| accepted

Answered
plot selective columns eliminating few
A = Data(:,[1:28,29:2:end]);

10 years ago | 0

| accepted

Answered
hour to hour minute second conversion
The basic concept is easy to implement: tmp = hour(:); H = fix(tmp); tmp = 60*(tmp-H); M = fix(tmp); tmp = 60*(...

10 years ago | 1

| accepted

Answered
I'm not able to change the position of x and y axis to origin in my plot.
The |'origin'| option applies to 2015b and later versions only: <http://www.mathworks.com/help/matlab/release-notes.html>, an...

10 years ago | 0

| accepted

Answered
how to remove zero values. my program is correct but i need only even and odd number
Using loops is a pointlessly complicated and slow way to solve such a simple task: >> n = 9; >> odd = 1:2:n odd = ...

10 years ago | 0

| accepted

Answered
How to apply certain action on struct fields?
The <http://www.mathworks.com/help/matlab/ref/structfun.html |structfun|> documentation clearly states that the input structure ...

10 years ago | 0

| accepted

Answered
Sliders - How to change value in a TextBox
Here is a minimal working example: function temp1 fgh = figure(); txh = uicontrol(fgh,'Style','text'); sld = uicon...

10 years ago | 0

| accepted

Answered
Random but unique values in matrix
A complete working example: X = randi([0,1],100,9); chk = true; while chk [~,idx] = unique(X,'rows'); i...

10 years ago | 2

Answered
How can I reduce memory-use on this combinatorics computation?
Don't calculate all permutations at once. Use |nchoosek| or perhaps one of the submissions on MATLAB File Exchange: <https://...

10 years ago | 0

Answered
Read Text file and then use the outputs in a loop
Change the parentheses to curly brackets: elm = Y{i}; And then learn about the difference between |()| and |{}| for cell ...

10 years ago | 0

Answered
How do i convert a 3 variable array to image?
What you have is called an _indexed image_, which you can read about here: <http://www.mathworks.com/help/matlab/creating_plo...

10 years ago | 0

| accepted

Answered
I am getting error in the expression: X(j) = F*X(j-1) + w; as, In an assignment A(I) = B, the number of elements in B and I must be the same, please help?
Have a look at the sizes of the LHS and RHS of that assignment: >> F*X_0 + w ans = 0.20794 2.05687 ...

10 years ago | 1

Answered
How to Hold matlab script for some seconds?
pause(2)

10 years ago | 0

| accepted

Load more