回答済み
dlmread reads rows instead of columns
*EDITED* something like the following, dlmread(filename,' ',[0 0 4 0]) or use textscan, filename = 'dummy.txt'; ...

6年以上 前 | 0

回答済み
table gui, set parameters
Fairly simple, data1=[1 16;1 15;1 14]; t=uitable; t.Data = data1; t.ColumnName = {'A','B'}; %and so on read th...

6年以上 前 | 0

| 採用済み

回答済み
how to export numerical part without decimal and digit with fractional part in the same array
One approach is to use fprintf and then specify the output format, A = [1.000 1.000 6338110.000 0.198 0.064 1.701 1.505...

6年以上 前 | 1

| 採用済み

回答済み
How to call and also return a matrix in a function?
_Output argument "output" (and maybe others) not assigned during call to "variable"_ Just as it says you probably haven't ass...

6年以上 前 | 2

| 採用済み

回答済み
hai i need a command for following details........
Simpler: Use randsample <https://www.mathworks.com/help/stats/randsample.html> randsample(2:12,4) ans = 9 ...

6年以上 前 | 1

回答済み
Find which cell element that contains element.
Use ismember first and then find indx = find(cellfun(@(x) ismember(B,x),A))

6年以上 前 | 0

| 採用済み

回答済み
How can I increase the precision of a limit to give a number with more digits?
if you want to display it on the command line, use format long if you want to write to a file, use fprintf fprintf('%...

6年以上 前 | 1

| 採用済み

回答済み
Index of non empty cells in a cell array
~cellfun(@isempty,C) or ~cellfun('isempty',C) The latter is faster (when run for 100000 iteration), so prefer that...

6年以上 前 | 0

回答済み
Subplot of bar graph within for loop
The command figure; creates a new figure everytime. You should move it outside both loops. And also the position of the s...

6年以上 前 | 1

| 採用済み

回答済み
How to find maximum without using max
You would need to use two for loops. One to move across rows, the other to move across the elements in each row (columns). What ...

6年以上 前 | 1

回答済み
how to convert a .textdata file in .mfile and use it
_how to convert a .textdata file in .mfile and use it_ There's a big difference between a *m-file* and a *mat-file*. - m-f...

6年以上 前 | 0

回答済み
Error using plot. Vectors must be the same length
Shouldn't you be using only the hours and minutes relevant to those respective months? decimal_hour = hh(indexjan)+(mm(index...

6年以上 前 | 0

回答済み
How to list variables in save() as an array of strings
use a cell array, vars = {'a','b','c'}; and then, save('dummy.mat',vars{:})

6年以上 前 | 1

| 採用済み

回答済み
Having trouble inserting data into my GUI table.
It's simply, f = figure; t = uitable(f); t.Data = randi(10,5); and if you're using appdesigner, app.UITable.Da...

6年以上 前 | 0

回答済み
Plz help me with this function related question
when you call |findandReplace| function in your main script, you should pass the inputs you received from the user. You have sto...

6年以上 前 | 0

回答済み
Reshape array of cells with different column sizes into matrix
One approach is to make all elements equal in size by padding 0s or nans and then use cell2mat, m = max(cellfun(@numel,T1))...

6年以上 前 | 0

回答済み
"Assignment has more non-singleton rhs dimensions than non-singleton subscripts" how to solve this error?
What exactly are you trying to do? X has 64 rows and 1 column decoded_bits has 1 row and 64 column and when you say, ...

6年以上 前 | 0

回答済み
Sorting a matrix by one column
That's not a matrix. If you meant to store them in cell arrays, C = {'john', 'jojo';'victor', 'vivi';'andre', 'dredre'}; ...

6年以上 前 | 0

| 採用済み

回答済み
Why it comes up with only the first slice all the time?
Probably you intended to write, sprintf('Z0%d',i); instead of sprintf('Z01',i); %the outout here is always Z01

6年以上 前 | 1

| 採用済み

回答済み
How to check if variable is in workspace?
You're probably using this code inside a function but not the main script that uses your base workspace. *That explains why you ...

6年以上 前 | 0

回答済み
Using ifelse in a loop - possible?
You need to use indexing. <https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html> here is...

6年以上 前 | 0

| 採用済み

回答済み
Hi, I want want to read excel files that are located in subfolders in my directory.
Importing data from many files has been explained exhaustively. Please read these: <https://www.mathworks.com/matlabcentral/a...

6年以上 前 | 2

| 採用済み

回答済み
Auto generating x and y axis of same scale and labeling
Define it once with an axis handle and then use linkprop to link all your xlim, ylim properties, read this: <https://www.math...

6年以上 前 | 0

回答済み
How can I average a matrix of 105108X6 constructed every 5 minutes measured data to 15 min?
I's suggest using a timetable. <https://www.mathworks.com/help/matlab/timetables.html> Frist convert your matrix to timeta...

6年以上 前 | 0

| 採用済み

回答済み
Index character in table
another way is to use regexprep, A_new = regexprep(A,'[A-Z]','') A_new = 1×2 cell array '024' '005'

6年以上 前 | 1

| 採用済み

回答済み
How to find mean from different variables in work space
why do you have 91 variables named sequentially in the workspace? Why not use a 3D matrix?! Read this: <https://www.mathworks...

6年以上 前 | 1

| 採用済み

回答済み
How to save multiple outputs of a for loop and combining it into a matrix?
It's always better to pre-allocate, A = zeros(25,10); %number of rows, number of columns Then use indexing, <https://d...

6年以上 前 | 1

| 採用済み

回答済み
Resizing of cells in a cell array
Use a loop, for k=1:numel(C) if numel(C(k))<3 C(k) = [C(k) zeros(1,3-numel(C(k))); else C(k) = C(1:3) ...

6年以上 前 | 0

| 採用済み

回答済み
Reading in the values from excel
replace x = mean(data_in(:,3)); with x = mean(data_in(1:10,3)); |1:10| could be any number indices within its lim...

6年以上 前 | 0

回答済み
Find and trim text in a table
use regexprep, T = table({"A_1";"AB_2";"B_10"},[1;2;1],[6;7;5],... 'VariableNames',{'Section' 'Data1' 'Data2'}); T.Se...

6年以上 前 | 0

| 採用済み

さらに読み込む