Answered
Substitute for join/ outerjoin in cell array?
Well, you can always convert your cell arrays to a table with <http://www.mathworks.com/help/matlab/ref/cell2table.html |cell2ta...

10 years ago | 2

| accepted

Answered
Code doesn't work with different path
Actually, you have missed the important part of the code: how is |filename_x| obtained? If you get an 'invalid file identifie...

10 years ago | 1

| accepted

Answered
Extracting specific column of values using regexp
Your text file looks fairly ordinary. Matlab shouldn't have much problem importing using one of its many functions. Probably, th...

10 years ago | 0

Answered
whats wrong with that loop ?
I have not understood your explanation, but one very obvious problem with your loop, is that nothing in it depends on |k|. Hence...

10 years ago | 0

| accepted

Answered
Help with root folder/fullfule...
Your |matlabroot| looks unusual to me. It normally is something like | C:\Program Files\MATLAB\R2016a|. No matter, if your ...

10 years ago | 0

Answered
Synchronizing Matrix size of multiple matrix such as A=300 x 3, B= 305 x 3 C= 290 x 3and so on. Based on the rows having same dates.
You simply have to use <http://www.mathworks.com/help/matlab/ref/intersect.html |intersect|> with the |'rows'| option repeatedly...

10 years ago | 0

| accepted

Answered
sprintf to cell array
In my opinion, the cleanest way to do what you want would be: C = {'a', 'b'}; output = cellfun(@(l) sprintf('Letter:%s',...

10 years ago | 2

Answered
Write a function (Not a built-in function) that converts a given number n in base 2 to base 10
Learn to use the <https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html debugger>. Step through ...

10 years ago | 1

Answered
Move file into folder
newdir = sprintf('view%2d', ii, jj); Is it really the intent that the format string only has one input, yet you pass two in...

10 years ago | 1

| accepted

Answered
Struct to double array conversion of empty function arguments no longer supported in 2015b or newer? Is this a new or old bug?
_To me, |a = struct(...)| and |a(1) = struct(...)| should both work equally well when a is empty._ When |a| is an empty *stru...

10 years ago | 0

Answered
angdiff doesn't work as documented
I don't have the robotics toolbox, so can't check. If it does truly behave as you say then it is a bug you should reports to mat...

10 years ago | 0

Answered
comparing 2 matrixes A and B and reassigning values in 2nd matrix B based on the first matrix A
Your description still leaves things unclear. The fact that you don't make sure that your examples are correct does not help. At...

10 years ago | 0

| accepted

Answered
Rail Fence Encryption function
<https://www.mathworks.com/help/matlab/ref/reshape.html |reshape|> the string. Honestly, this is trivial to implement. Is it hom...

10 years ago | 0

| accepted

Answered
Is it possible to stack tables?
As Stephen says, using cell arrays may be easier. Alternatively, you could concatenate the tables into one tall table with tw...

10 years ago | 1

Answered
Legacy implementation of strtrim prior to R2016a
regexp(yourstring, '(?<=^\W*)\w.*?(?=\W*$)', 'match', 'once') should do the trick

10 years ago | 0

| accepted

Answered
How do you add parameter values to filename?
Use <http://www.mathworks.com/help/matlab/ref/sprintf.html |sprintf|> to build strings: param1 = 250; param2 = 1000; param3...

10 years ago | 0

Answered
hi, I need to get the X,Y coordinates of white pixels area. can anyone help me to do this,please
Use <https://www.mathworks.com/help/images/ref/regionprops.html |regionprops|> to get the size and location of each white region...

10 years ago | 0

| accepted

Answered
Matrix-vector multiplication vectorization
Note that |v=[1 2 3; 4 5 6; 7 8 9;10 11 12;13 14 15]| is 5 rows of *1x3* vectors, not *3x1* vectors. Simply multiply your mat...

10 years ago | 2

| accepted

Answered
creating a perfect number function
First and foremost, learn to use <https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html matlab's...

10 years ago | 0

| accepted

Answered
How to save enumerations properties in a mat-file ?
I see exactly the same as Neyton, in both 2015b and 2016b-pre, m_data is not restored properly. But I must say, that it is a ...

10 years ago | 2

| accepted

Answered
How to convert a numeric array to a table.I want the first row of data of the array to be J and the second row of data to be K in a table T[J K];
array2table(O.', 'VariableNames', {'J', 'K'}); Single letter variable names / column names are not good practice. Use varia...

10 years ago | 0

| accepted

Answered
Finding second smallest element in a row.
If by 2nd smallest you mean 2nd smallest *distinct* value: A = [1 0 1 2 1 4 2 3]; uA = unique(nonzeros(A)); %does sortin...

10 years ago | 4

Answered
Concatenate and sort 2 Matrices containing intervals
Assuming that your intervals don't span too big of a range and that they're all on integer boundaries, you could expand both A a...

10 years ago | 0

Answered
How to convert unicode into a string?
Unicode support is not very well explained in the doc. But it would appear that the following would work: codedstring = '\u...

10 years ago | 2

| accepted

Answered
Changing table columns to the same type
There are several errors that you're making. For a start, |()| indexing on tables return tables. You would have to use |{}| ...

10 years ago | 0

| accepted

Answered
Handling of null in JSON sourced from webread
Matlab does understand null, for example, in r2016a, >>json = matlab.internal.webservices.fromJSON('{"values":[1, "2", null...

10 years ago | 1

Answered
Extend scope of variables to other local functions
_my m-files are sets of related functions, almost like classes_ Then use classes, you can have your shared variables as priva...

10 years ago | 1

Answered
How to restart the some portion of script for number of times ?
Even better than a loop (or in combination). Extract the portion of script that is repeated into a <https://www.mathworks.com/he...

10 years ago | 0

| accepted

Answered
What is difference between x='93'; and x=93; ?
_I wanna know about each and every detail of MATLAB._ Read the <https://www.mathworks.com/help/matlab/index.html documentation> ...

10 years ago | 0

Answered
Add an item to a class
|struct| and |class| are two completely different types even if they have the same fields/properties. You have defined the books...

10 years ago | 2

| accepted

Load more