Answered
How to write a loop to plot a given range of rows/values from a column text file?
First, I would recommend that you load your data into a table rather than using the old fashioned |textscan|. Tables are much ea...

8 years ago | 0

Answered
Matlab to write on already open excel file
_My problem is that the connection is made only with the first instance of excel that was open on my computer_ First thing to...

8 years ago | 0

Answered
merge columns of cell array into matrix
Assuming all the tables have the same variable names, then you could convert the cell array of tables into a structure array: ...

8 years ago | 0

Answered
Matlab COM connection using an actxserver
Most likely, the problem is with your surfer application. The error message you see comes from Windows, not matlab. You could...

8 years ago | 0

| accepted

Answered
creation of a dynamic matrix
A = [1 2 3; 4 5 6] newrow = [7 8 9]; %add a row to existing matrix: A = [A; newrow] %or %A(end+1, :) ...

8 years ago | 0

| accepted

Answered
how to divise an image on 2d to 6 segments with matrix rotation ?
Use <https://www.mathworks.com/help/releases/R2018b/matlab/ref/hold.html |hold on|> after your first plot to stop new plots over...

8 years ago | 0

| accepted

Answered
Undefined function or variable
Function can't see the variables in your main workspace. You have to pass any variable you want to use to the function. Chang...

8 years ago | 0

| accepted

Answered
Maximising Pixels within Certain area of Matrix
_One whose sum of pixel values is the greatest_ Convolve your matrix with an array of 1 the same size as the area. The locati...

8 years ago | 0

| accepted

Answered
Return subscripts of common rows for multi-dimensional matrix?
[row, layer] = ind2sub([size(B, 1), size(B, 3)], find(ismember(reshape(permute(B, [1 3 2]), [], size(B, 2)), A, 'rows'))) I...

8 years ago | 0

| accepted

Answered
Mean of indexed data in a matrix
Here's one solution: correlations = [1 0.008 0.4168 0.3166 0.3269 0.008 ...

8 years ago | 1

Answered
Average Multiple Matrix Columns Based On Duplicate Entries In A Different ColumnVector
So if I understood correctly, the shape of B does not matter and it is to be considered a column vector. [~, ~, subs] = uni...

8 years ago | 0

| accepted

Answered
how to use xmlread in a very simple example
I would recommend you use <https://uk.mathworks.com/matlabcentral/fileexchange/58700-xml2struct-with-bug-fix-and-added-features ...

8 years ago | 2

| accepted

Answered
Matlab is implicitly casting to the lower type. Can you change it?
I believe there is a matlab <https://blogs.mathworks.com/?s_tid=gn_mlc_blg Blog> where this is discussed. This is intentional, t...

8 years ago | 2

Answered
hi, everybody. my question is how can I use a string for calling a structure . for example my string is "Data. signal.EMG" and I want data=Data.signal.EMG.
_subject01, subject02,....subject10_ Here you go, that's where you've gone wrong. Never number variables. It's a clear indica...

8 years ago | 0

| accepted

Answered
Outerjoin tables with identical variable names and unique/non-unique keys
You need to tell |outerjoin| that only the |Key| variable is to be as key: outerjoin(a, b, 'Keys', 'Key', 'MergeKeys', true...

8 years ago | 0

| accepted

Answered
write cell output to a joint txt file
Well, assuming that the conversion to table has been successful, simply: writetable(Res, 'Result.txt'); should do it. If...

8 years ago | 0

Answered
Transforming a cell array into a table, rotating it a 90 degree and deleting particular rows
%note the ' below to transpose the 4xN cell array into a Nx4 cell array t = cell2table(yourcellarray', 'VariableNames', {'I...

8 years ago | 1

Answered
How to convert XLS to S1P/SNP
Considering that excel files can contain anything and that your s1p files have a very specific format, there can't be a universa...

8 years ago | 0

Answered
how to extract the fields header in the shape file?
A complete guess as it's really not clear what you're asking: If you want to get the list of fields of a structure, use <https:/...

8 years ago | 1

| accepted

Answered
split and plot data loop
One possible way: [group, seriesname] = findgroup(yourdataset.nameofthirdcolumn); figure; %create figure; hold on;...

8 years ago | 0

Answered
How to read image matrix stored in a structure
If you want to see the image, it's simply: imshow(dataset.train.images); The image is a grayscale image. However, it is ...

8 years ago | 0

| accepted

Answered
Is there a way to extract specific fields from a structure ?
ss1(:, rnd) = [SN.E]; % or ss1(:, rnd) = vertcat(SN.E); See <https://www.mathworks.com/help/matlab/matlab_prog/acce...

8 years ago | 0

| accepted

Answered
Cycle depth limit 500 exceeded in MATLAB Function MATLAB Function. This could indicate an infinite cycle.
Your function is recursive, it calls itself. You've put a condition to stop the recursion when |abs(t_winding-tw)| is less than ...

8 years ago | 0

Answered
Cell Array Size and Saving
Yes, there is necessary overhead for cell arrays. Note that |whos| (which your |getsize| uses|) does not actually show all the m...

8 years ago | 1

| accepted

Answered
from JTable to structure fieldname
A word of caution first: five minutes ago, I didn't know anything about JTable. <https://docs.oracle.com/javase/7/docs/api/ja...

8 years ago | 0

| accepted

Answered
How to recognize gender by name
Very easy to do: %inputs: %genderlist = Mx2 cell array, 1st column name, 2nd column gender %namelist = Nx1 cell array...

8 years ago | 1

| accepted

Answered
Custom timer function timing query
_I probably need to devise a way to store the previous x number of inputs_ That's fairly easy to do. It does not involve loop...

8 years ago | 0

| accepted

Answered
Error using imread (line 403) Signature cannot be empty. Error in read_all_images (line 30) im = imread(fil​esrcpath1,​'bmp');
_Signature cannot be empty._ You'll get this error if the file is not a valid BMP image. More precisely, the error will occur...

8 years ago | 1

| accepted

Answered
Extracting Non-Zero Values From Array and Applying to a Different Matrix
tokeep = p ~= 0; %logical array indicating which elements to keep workingP = p(tokeep); workingPhi = phi(tokeep);

8 years ago | 1

| accepted

Answered
Exporting from Matlab to excel with macro.
My advice would be to have a blank excel file that already has the macro code in it. Whenever you want to create a new file with...

8 years ago | 0

| accepted

Load more