Answered
Matrix "addition" qeustion
Right, you don't have a matrix but a table. Using correct term avoids wasting everyone time. matrices and tables are two complet...

9 years ago | 0

| accepted

Answered
How do I obtain information about the background color of a lot of cells (~600,000cells) in an Excel spreadsheet ?
parfor is not going to help at all with activex calls. If anything, it could slow the processing down as on the excel side the m...

9 years ago | 1

Answered
Matrix "addition" qeustion
If I understood correctly: A = X; A(:, 47:53) = X(:, 47:53) + X(:, 12:18) .^ 2; A(:, 54:60) = X(:, 54:60) + X(:, 12:1...

9 years ago | 1

Answered
Generate the output as a cell array using for-loops
Where have you seen that matlab would replace the text |[something]| by the value of the |something| variable? If you invent you...

9 years ago | 1

| accepted

Answered
I want to generate random (integers only between -10 and 25) mathematical expressions and also evaluate them. Can someone help with the code?
Something like this ? numberrange = [-10, 25]; maxoperators = 10; numops = randi(maxoperators); %number of operation...

9 years ago | 1

| accepted

Answered
reshaping cell containing double arrays
That's because what you want is not reshaping but a concatenation. (The matrices may not be contiguous in memory): test = [...

9 years ago | 1

Answered
vv with long names
Matlab only uses the first <https://www.mathworks.com/help/releases/R2017a/matlab/ref/namelengthmax.html |namelengthmax|> charac...

9 years ago | 1

| accepted

Answered
can i obtain this format ?
eye(4) * pi + fliplr(eye(4)) would be one easy way.

9 years ago | 0

| accepted

Answered
how could i generate a vector ?
V3 = 1 ./ (1:10).^2

9 years ago | 0

| accepted

Answered
how to handle 'nested' arrays
In this particular instance, the easiest way to solve your problem is to add the |'once'| option to your |regexp|: matches ...

9 years ago | 1

| accepted

Answered
How do I assign the result of a decimation to a column in a matrix?
Note: dec_data; does nothing at all. I have no idea what you intended with that line. Anyway: dec_data = zeros(cei...

9 years ago | 1

| accepted

Answered
How to display an image randomly
Use |randperm| to create a random ordering of your images. The code would go something like: root = 'C:\somewhere\somefolde...

9 years ago | 1

Answered
Is there a quick method to remove data from a structure?
If I understood correctly, all that would be needed is: Data2 = structfun(@(fld) fld(:, 27000:end), Data2, 'UniformOutput',...

9 years ago | 0

| accepted

Answered
Scanning strings in a string array
This is fully explained in the <https://uk.mathworks.com/help/matlab/matlab_prog/create-string-arrays.html#d119e13244 documentat...

9 years ago | 0

Answered
Which is the most appropiate loop if I want to create a vector myOrder(n) with random values?
A complete guess since the explanation of the generation is not clear (and giving us code that doesn't work isn't a replacement ...

9 years ago | 0

| accepted

Answered
How do i remove the letter a user inputs from a word?
All the conversions to double and back to char are completely unnecessary in your script (and in Salim answers). The exact same ...

9 years ago | 1

Answered
I am having trouble with some basic plotting using the polyval function.
The only issue I see in your script is x=linspace(0,100,0.1); which asks for a grand total of 0.1 points between 0 and 1...

9 years ago | 0

Answered
Extracting rows from a matrix based on values in columns
It's much easier to do this with the newer |splitapply| rather than the older |accumarray|: A = [[1;1;3;2;3;1], rand(6, 3)]...

9 years ago | 1

| accepted

Answered
How to solve the errors:Operands to the || and && operators must be convertible to logical scalar values.
It would have been useful if you'd shown us line 257 since it's where the error occurs. You get this error because you're try...

9 years ago | 0

Answered
Why won't CheckStatus(1, 1) return 0?
Before reading the documentation of |dbstop|, I'd say read the <https://uk.mathworks.com/help/releases/R2017b/matlab/getting-sta...

9 years ago | 0

Answered
Why won't this display?
Well, you're creating a variable |a|, a variable |b|, and a function |lrgn| but never do anything with them such as calling the ...

9 years ago | 0

| accepted

Answered
How to hide away properties of an object?
I don't think there's any way to hide private properties from |struct|. The only workaround I could think of would be to sto...

9 years ago | 1

| accepted

Answered
rounding function for converting it to an integer value.
My first advice would be to use much better variable names. Use full words that explain what is in the variable. Right now, you ...

9 years ago | 0

| accepted

Answered
For loop only returning first and last iterations correctly
Not knowing what the _correct length_ or what the _correct output_ should be. It's difficult to say what is going wrong. So I'll...

9 years ago | 0

Answered
Using regexp to Search Large Text File for Wanted Data
_is regexp the best method?_ For EL HGT, probably. For your Northing/Easting for UTM(Zone 15), no because extracting that val...

9 years ago | 1

| accepted

Answered
Complete newbie with hopefully simple matrix division question - not answered elsewhere that I could find
A note on terminology that will make it easier for you to get understood when asking question, an *array* is an n-dimension bunc...

9 years ago | 0

Answered
how to create a function ?
Assuming that 0 instead of 24 is ok: data_len = 24; f = @(a, b) mod(a : b + data_len*(a>b), data_len); results: ...

9 years ago | 1

| accepted

Answered
how to insert elements to get a new output
cv = '000001010011100101111' vect = [1 2 3]; groupsize = 3; assert(mod(numel(cv), groupsize) == 0, 'Input cannot ...

9 years ago | 1

| accepted

Answered
Moving sum of a matrix
Following the edit to the question, one way to do what you want: A = [3 2 5 6 1 4; 3 6 9 3 4 1; 8 1 9 0 5 2...

9 years ago | 2

| accepted

Load more