Answered
Help with creating artificial image
imresize(triu(ones(30, 60)), [300, 60], 'nearest') is probably the simplest

8 years ago | 0

| accepted

Answered
How to join/merge all sub tables into 1 table?
[~,SheetNames] = xlsfinfo('a.xlsx'); nSheets = numel(SheetNames); SheetContents = cell(size(SheetNames)); for iSheet...

8 years ago | 1

| accepted

Answered
How can I tensorise columns of two matrices to produce a 3D array?
A .* permute(B, [1 3 2]) or visit in ancient versions of MATLAB: bsxfun(@times, A, permute(B, [1 3 2]))

8 years ago | 0

| accepted

Answered
fill a table column in word files from matlab
It is possible to interact with words document using <https://msdn.microsoft.com/en-us/library/kw65a0we.aspx Word Object Model>....

8 years ago | 0

| accepted

Answered
reshaping a Structure using structfun command and reshape
structfun(@(fld) reshape(fld, 50, 1), yourstruct) or structun(@(fld) fld(:), yourstruct)

8 years ago | 1

| accepted

Answered
Matlab and Interactive Brokers
On a Mac? If that's the error message you get on a Mac then it's a very misleading error message! The technology used by actx...

8 years ago | 0

Answered
My fillmissing function doesnt do moving methods
As per the <https://uk.mathworks.com/help/matlab/release-notes.html?rntext=fillmissing&startrelease=R2016b&endrelease=R2018a&gro...

8 years ago | 0

| accepted

Answered
Directly accessing a method of a returned object shadows argument list
I remember reading somewhere (probably on Answers) that dot indexing the result of a method is not officially supported in matla...

8 years ago | 1

| accepted

Answered
Hello! I want my 50 inputs to take a random value from a set of numbers (already defined) with an equal probability..
I don't see why you'd want to use a loop. value_set = [0, 0.1, 0.2, 0.3, 0.4, 0.5]; numvalues = 50; random_selectio...

8 years ago | 0

| accepted

Answered
method to check for similarity using if...else loop
Use <https://www.mathworks.com/help/matlab/ref/ismember.html |ismember|> to test for set membership, not |==| or |strcmp|: ...

8 years ago | 1

| accepted

Answered
Insert specific number of rows of zeroes(5) after every 56 rows in my n*m matrix. I am able to create matrices but can I do the insertion without loop given I know the size of matrix? Thanks for help
You can indeed do it without a loop. # transpose the matrix so that your rows are columns (since matlab works by column) # ...

8 years ago | 0

Answered
OOP- instantiate a class within a method of a different class
For somebody coming from C++, I'm surprised you're not using private/public qualifiers for your class methods, rather than havin...

8 years ago | 0

Answered
Random Generation of Binary Orthogonal Matrix of Size n * n with Matlab
I'm not a mathematician so I could be completely wrong but aren't square binary orthogonal matrices just permutations of the row...

8 years ago | 0

| accepted

Answered
Compare and find multiple matching strings
The loop was never needed in the first place: loc1 = find(strncmp(rawInpStr{1}, '** Job name', 11)) For several search s...

8 years ago | 1

| accepted

Answered
For loop to include an array into a different array
You're trying to stuff 6+2 = 8 columns in an array of 7 columns. Of course, it's not going to work. An easy fix would be to decl...

8 years ago | 0

Answered
How to concatenate an array of numbers without for loop
A = [1 2 3]; sprintf('(%s)', strjoin(compose('%d', A), ', '))

8 years ago | 0

Answered
How to select certain data from .txt file
Probably the easiest, assuming your text file format is straightforward to decode: filecontent = readtable('c:\somewhere\so...

8 years ago | 0

| accepted

Answered
Filters to obtain blurred image
Any convolution of your image with any arbitrary kernel will result in blurring, e.g. blurredimage = convn(yourimage, ones(...

8 years ago | 0

Answered
How to create a perimeter from x,y coordinates
The easiest way, assuming R2017b or later, is to use the <https://www.mathworks.com/help/matlab/ref/polyshape.intersect.html |in...

8 years ago | 0

Answered
How to read a specific line containing a value?
_"is there any advantage to use readtable?"_ It's simply a more powerful version of |xlsread|. It figures out the format of t...

8 years ago | 1

| accepted

Answered
Export data and Format Cells in Excel using Matlab using ActiveX
You can format individual or multiple cells at once with the <https://msdn.microsoft.com/en-us/VBA/Excel-VBA/articles/range-numb...

8 years ago | 0

Answered
how to find index of duplicate values in a matrix ?
Your example output (a 3x2 cell array) can only work if the numbers of repeat is the same for all repeated values. Otherwise you...

8 years ago | 2

| accepted

Answered
Increase the number of fields within a 'for' loop?
I personally don't like multilevel structures. They're often awkward to use and matlab's display interface for them is lacking. ...

8 years ago | 0

| accepted

Answered
Using ActiveX to copy and paste from a website
According to the MSDN documenation of the <https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-devel...

8 years ago | 1

| accepted

Answered
create string with characters in char array
The problem is not with your |str| variable, which is perfectly fine, but with the |variable1| and |variable2| which *must* be a...

8 years ago | 0

| accepted

Answered
Struct contents reference from a non-struct array object.
If the line generating the error is a = get(handles.noise_pop, 'value') then the cause of the error is that the |handle...

8 years ago | 0

Answered
Making a heatmap from a table
It's not clear what is supposed to go in the x and y axis of your heat map and what defines the colour. If the x axis is supp...

8 years ago | 0

| accepted

Answered
Check if there are repeated elements in a matrix
The following should work so long as for a single ID the same point is not repeated. Also it won't detect if you have two discon...

8 years ago | 0

Answered
Difference visualizing image ImageJ (Bio-Format) and Matlab
Your file is a multipage tiff file (with what looks like 3 levels of magnification of the same image). When you use matlab to op...

8 years ago | 0

| accepted

Answered
Get all positions (row,column) that have a certain value in a matrix and get the values of these same positions in a new matrix
D = xlsread('C:\Users\Joana\Desktop\PIV_dist_cosSim\dist\dist_CoordVectorPIV.xlsx'); [uD, ~, uid] = unique(D(:,1)); ...

8 years ago | 0

| accepted

Load more