답변 있음
Removing an empty 1st row from a UITABLE (cell array)
d = d(~cellfun(@isempty, d))';

대략 4년 전 | 0

| 수락됨

답변 있음
How can I make a for loop a while loop?
x57a= []; i = 1; while i<= 1000 if rem(i,5) ==0 || rem(i,7) ==0 if rem(i,5)==0 && rem(i,7) ==0 i...

대략 4년 전 | 0

| 수락됨

답변 있음
strrep for unordered string
What about reguler expression? result = regexprep('Z06IL202RNP302', '(Z|IL|RNP)', '');

대략 4년 전 | 0

| 수락됨

답변 있음
Comparing Two Different Arrays
X = B>min(A) & B<max(A);

대략 4년 전 | 1

| 수락됨

답변 있음
How to export cell array to excel
A = {'matlab' 'ver' num2str(12)}; % actually no need of number to string conversion writecell(A, 'filemname.xlsx');

대략 4년 전 | 0

| 수락됨

답변 있음
I need to create a 1x6 string combining strings?
Use + operator for string data type concatanation X = space+ L+ space+ J+ space+ I+ space+ C; % this works for you

대략 4년 전 | 0

답변 있음
Vector averaging with mean command
Second argument of mean is dimension, your input vector X is 1x533 vector 1D vector. 1) I assume you need mean of the values f...

대략 4년 전 | 0

답변 있음
Hi, i'm having trouble reading multiple excel files in a loop and performing simple calculation of the mean for a specific column
readtable is better than readmatrix here folder_path = 'C:\Users\rebec\Desktop\loop'; % your path num_files = 3; % number...

대략 4년 전 | 0

| 수락됨

답변 있음
working with files, changing in the text
data = fileread('kik.txt'); % your text file data rep_data = regexprep(data, '[789]', '!'); % replaced data fid = fopen(...

대략 4년 전 | 0

답변 있음
how to extract number from a .dat file and assign it to an excel sheet cell?
Assuming your a.dat file is with data "Surface Integral Report" Average of Surface Vertex Values ...

대략 4년 전 | 0

| 수락됨

답변 있음
Multiply a scalar to all column of a table
Suppose T is your table variable with it's variable name Var1 T.Var1 = 10*T.Var1;

대략 4년 전 | 1

| 수락됨

답변 있음
Probability, Statistics, and Applications in BME
data_500 = rand(1, 500); % 500 random values values_40 = randperm(500, 40); % 40 random values(...

대략 4년 전 | 0

답변 있음
Count Occurrences of a Variable from Excel per Chronological Date
t= readtable('SS.xls'); % read as table t.S1 = single(strcmp(t.ComplaintLocation, 'S1')); t.S2 = single(strcmp(t.ComplaintLoca...

대략 4년 전 | 0

| 수락됨

답변 있음
Variable Number of Input Arguments
You need provide two inputs but you have provided only one input 20. Give inputs functions as age and limit [too_young] = un...

대략 4년 전 | 0

답변 있음
how to take a certain number of characters:
num_str = num2str(9928900200); first_part = num_str(1:6); second_part = num_str(7:end); num = strcat(first_part, ',', sec...

대략 4년 전 | 0

답변 있음
Could anyone help me to count the number of elements present in each row are different.
result = cellfun(@(x,y)strcmp(x,y), A, B)/numel(A);

대략 4년 전 | 0

답변 있음
Formatting .txt files as the one produced by command prompt.
You can include same input to system command sts = system('tasklist.exe > %USERPROFILE%\Desktop\processlog.txt'); This works a...

대략 4년 전 | 1

답변 있음
Plotting two .m files on one graph
Maintain same figure value in both files. suppose file_1.m figure(1) % figure 1 plot(1:100) hold on file_2.m figure(1) ...

대략 4년 전 | 0

답변 있음
How to Convert xls file to txt file in matlab?
Read ExcelFile.xls data and write that data to text file Data = readtable('ExcelFile.xls'); writetable(Data, 'textfile.txt');

대략 4년 전 | 1

| 수락됨

답변 있음
division of consecutive numbers
y = randi(100, 1, 120); % assumed data of length 120 for ii = 1:4:length(y) values_4 = y(ii:ii+3); % fou if mean(val...

대략 4년 전 | 1

| 수락됨

답변 있음
Command to delete last row and column of a matrix
your_matrix(end, :) = []; % deletes your matrix end(last) row your_matrix(:, end) = []; % deletes your matrix end(last)...

대략 4년 전 | 0

답변 있음
Calculating the mean of a non-continuous data set
mean_val = nanmean(your_variable)

대략 4년 전 | 0

| 수락됨

답변 있음
Question on using interpolate function
"I want to find the x value at which data has 0.4 (first occurence)." match_loc = find(data == 0.4); val = x(x == match_loc(1)...

대략 4년 전 | 0

답변 있음
extraction of part of image
im = imread('peppers.png'); % read image res_image = uint8(im>200).*im; % apply your condition figure, imashow(res_image);...

대략 4년 전 | 0

답변 있음
how to defining date format ?
d_vect = datetime('2007.01.01. 01', 'Format', 'yyyy.MM.DD. HH');

대략 4년 전 | 0

| 수락됨

답변 있음
plot graph for nested if
l=input('l='); g = zeros(1, length(0:100));% initialize g with 0's of length t c = 1; % counter variable for t=0:100 if...

4년 초과 전 | 0

| 수락됨

답변 있음
Merge two table columns (column 1: categorical data; column 2: double el) into one (column 3: categorical or string el) and replace columns 1,2 with 3 in the table
T.Lettersnumbers = strcat(char(T.Letters), num2str(T.Numbers));

4년 초과 전 | 0

| 수락됨

답변 있음
another way to break without using the command 'break'
You can set a flag variable to terminate while loop without using break keyword term_while = true; % flag variable c = 0...

4년 초과 전 | 0

답변 있음
Given a table, how can I delete rows not satisfying a certain property?
Assuming t is your table variable and variable names are col_1 and col_2, cond = (35>t.col_1 & t.col_1<40)&(20>t.col_2 & t.col_...

4년 초과 전 | 0

| 수락됨

답변 있음
For Looping to import .mat files
procfiles = dir('D:\Leuven_Visit\Workflow\Matlab\Results\HV_NL\*.mat');% cd is not recommended for iMat= 1:size(procfiles, 1) ...

4년 초과 전 | 0

| 수락됨

더 보기