Answered
How can I read in a key:value dictionary formatted string into a cell or structured array format?
Assuming you have R2016b or later, this is easily done with <https://www.mathworks.com/help/matlab/ref/jsondecode.html |jsondeco...

9 years ago | 2

| accepted

Answered
Export of Cell-Arrays to more than one txt-file
Well, yes, that first line you show will cause an error since you attempt to write the whole cell array (the 310 matrices) into ...

9 years ago | 1

| accepted

Answered
how do i keep my format when exporting to csv or excel
It's not clear in your example where the |ssn| variable comes from. Anyway, the root of your problem is not with matlab but ...

9 years ago | 0

Answered
fast solution for matrix multiplication
This should work: k = 1:N-1; kcoeffs = k ./ (2*k-1) ./ (2*k+1); %R2016b or later B = squeeze(sum(2*kcoeffs .* ...

9 years ago | 0

Answered
How to extract the values from a matrix 282x1 if I know the rows number?
If you have the rows indices, then it's just a matter of simple indexing. To extract the row numbers contained in the variable |...

9 years ago | 0

Answered
Matlab comparison of two large matricies
This is how I'd do it: matches = cell(size(B, 1), 1); for Brow = 1:size(B, 1) Bcols = find(~isnan(B(Brow, :))); ...

9 years ago | 1

| accepted

Answered
array in cell problem
B{1} = A

9 years ago | 0

| accepted

Answered
Sorting structure with vector field
Assuming that you want to sort by antecedent [~, order] = sortrows(vertcat(A.antecedent)); A = A(order)

9 years ago | 1

| accepted

Answered
int16 to uint8 array conversion for Serial Transmit
Use <https://www.mathworks.com/help/matlab/ref/typecast.html |typecast|>: exampleint16 = int16(12345); sameasuint8 = t...

9 years ago | 0

Answered
Converting Strings in a Cell Array to Doubles (trickier than you think)
_"I have one solution, which is: Data_Out= cellfun(@(x)str2double(x), Data_In);"_ Considering that your anonymous function ju...

9 years ago | 1

| accepted

Answered
Sort fieldnames in a structure alphabetically ignoring case
[~, neworder] = sort(lower(fieldnames(yourstructure))); newstructure = orderfields(yourstructure, neworder) would be one...

9 years ago | 0

| accepted

Answered
How do I use webread with HTTPS?
Both of your https webread work for me (well, the first one errors but only because of the typo ยง instead of & in the url, which...

9 years ago | 0

Answered
Help urgent ! Error while evaluating uicontrol Callback
As per <https://uk.mathworks.com/matlabcentral/answers/341896-help-urgent-error-while-evaluating-uicontrol-callback#comment_4566...

9 years ago | 3

Answered
How to get the adjacency matrix from a cell array of strings?
If you're using a very ancient matlab version such as R2012a, then mention it in your question. This would work on R2012a: ...

9 years ago | 1

| accepted

Answered
all possible combinations of three vectors
One possible way, which doesn't require any toolbox: [ca, cb, cc] = ndgrid(A, B, C); combs = [ca(:), cb(:), cc(:)]

9 years ago | 3

| accepted

Answered
create a matrix from a for loop and store it or allot it one after the other from a for loop
If using a 2D cell array as suggested by James, I would either keep it as a cell array, or convert it to a 3D matrix with K...

9 years ago | 1

Answered
read the size of cell array with the same element
Please use valid matlab syntax in your question, so it's not ambiguous. Assuming that your cell array is of the form: c = {...

9 years ago | 0

| accepted

Answered
Conversion of PDF data to Spreadsheet
Well, your first hurdle will be to capture the data from the pdf. There is no built-in tool for this in matlab and depending on ...

9 years ago | 0

Answered
how do i combine multible excel file into single file using matlab?
Assuming your excel files all have consistent header, this should be fairly simple to achieve: path = 'D:\source'; files...

9 years ago | 0

| accepted

Answered
max_product that t takes v as vector and n as positive integer
Another possible way: slide = toeplitz(v(1:n), v); [product, ind] = max(prod(slide(:, n:end)));

9 years ago | 1

Answered
Understanding How Sliding Window works
I'm not entirely sure what your question is. To calculate a sliding standard deviation over a signal, you can use <https://w...

9 years ago | 0

| accepted

Answered
Undefined function for input arguments of type 'char'.
I assume the callback itself is defined in the associated GUI figure. One possibility is that by the time the callback is cal...

9 years ago | 0

Answered
How do I sort the max values from a matrix ?
[~, order] = sort(Occurences.Momentum(:, 2), 'descend'); top80 = Occurences.Momentum(order(1:80), :) Or: sortedData...

9 years ago | 1

| accepted

Answered
How can I fix an 'index out of bounds
_Is there an error somewherein my code?_ Well, Duh! You get an error. The best way for you to find the error(s) is to use the...

9 years ago | 1

Answered
load multiple .mat files
Yes, you can't concatenate structures (the output of |load|) with different field names, which will always be the case with |loa...

9 years ago | 1

| accepted

Answered
()-indexing must appear last in an index expression
_So My question is what to do ( without doing a loop on the elements of i )_ You don't have a choice. There's no magic matlab...

9 years ago | 1

| accepted

Answered
Matlab System Error: Access violation
I doubt there's anything we can do about it on this forum. I would recommend you follow the advice at the end of your dump and c...

9 years ago | 0

Answered
Replace NaN by using for loop
The simplest way to get rid of NaNs in a table is to use the <https://www.mathworks.com/help/matlab/ref/fillmissing.html#inputar...

9 years ago | 0

Answered
Find distance between row vectors?
Am I missing something? can't you just concatenate you vectors into a matrix and do exactly the same as you did? distances ...

9 years ago | 1

| accepted

Answered
I need to rewrite numbers of variable to vector.
b = num2str(a) - '0';

9 years ago | 1

| accepted

Load more