回答済み
Analysing hourly data over a year
Yes, there is. To play with such time based measurements, especially for data over such long duration, you could use a time tabl...

9年弱 前 | 1

| 採用済み

回答済み
Selecting a value that is repeating most of the times in an array
Another idea using |mode|, <https://www.mathworks.com/help/matlab/ref/mode.html> A = [8 8 8 10 10 13 13 13 5 5 1 7 3 3 8...

9年弱 前 | 1

回答済み
How to shift elements in a row matrix?
If you have access to Fixed-Point Designer toolbox, you could use |bitsll| <https://www.mathworks.com/help/fixedpoint/ref/bit...

9年弱 前 | 0

| 採用済み

回答済み
How can put the values inside tolerances?
Firstly, you don't need those digdata, digdata2 functions. You're code is very slow because of them. You're loding the same mat ...

9年弱 前 | 1

| 採用済み

回答済み
why do i get this error "Undefined function or variable 'vect2mat'."?
you mean vec2mat? Note that you'd need communication systems toolbox for that. But otherwise you could use reshape! <ht...

9年弱 前 | 0

| 採用済み

回答済み
how to reshape data with leap year?
No need to reshape. Use timetables. <https://de.mathworks.com/help/matlab/matlab_prog/create-timetables.html> <https://de....

9年弱 前 | 0

| 採用済み

回答済み
How I generate a random number between 300 and 450?
randi([300 450]) and everything you need is summarized here: <https://www.mathworks.com/help/matlab/random-number-generation...

9年弱 前 | 1

回答済み
How to remove rows that meet a condition?
allOptions(allOptions(:,1)>=allOptions(:,2),:)=[];

9年弱 前 | 0

| 採用済み

回答済み
how to select m-file from gui Pop-Up Menu
something like, function pushbutton_callback(src,event) [FileName,PathName] = uigetfile('*.m','Select the MATLAB code...

9年弱 前 | 1

回答済み
How do I separate month, day of the week, and hour of the day for each row of a csv time series file so that I can do a factor analysis for month, day, hour?
Use a timetable! <https://www.mathworks.com/help/matlab/timetables.html> <https://www.mathworks.com/help/matlab/matlab_pro...

9年弱 前 | 0

| 採用済み

回答済み
Find a specific number in an imported excel sheet
[rowind,colind] = find(B(:,1)==9 & B(:,2:end)==14.38) Do you mean this?

9年弱 前 | 0

| 採用済み

回答済み
index exceeds matrix dimension
When d = 2, V(SNEXT((d+1)+1,t+1)) means V(SNEXT(4,t+1)) %there's no 4th row and I don't even have to say about 't'...

9年弱 前 | 0

回答済み
zeros before a string using num2str
Try this A = [69.45 31.71 95.36 3.44 7.82]' str = string(A) newStr = pad(str,7,'left','0') %or pad(str,7,'both','0') ...

9年弱 前 | 0

回答済み
Problem with while loop
In the code you've provided, the variables ( |rcapa, capaPA|) are not defined. Moreover even if you define it in the beginnin...

9年弱 前 | 0

| 採用済み

回答済み
Date conversion, works for one set but not the other, why?
I've tried your codes with the sample data provided, it works just fine. In fact, just the first code snippet works fine for bot...

9年弱 前 | 0

回答済み
how to write text files in a specific format?
You shouldn't need a loop. fileID = fopen('G:\FLOW_OUT_32.txt','w'); fprintf(fileID,'%d %12.6e\n',output32.'); %assuming o...

9年弱 前 | 0

回答済み
Position of an element in a vector
[row,col,v] = find(z==-2)

9年弱 前 | 0

回答済み
i want to extract valid possibilities from matrix. A screenshot of that matrix is attached here.
Try this, Z_re = arrayfun(@(a) [Z(:,a:a+1)],1:2:size(Z,2),'uni',0); Z_selected = cell2mat(Z_re(cellfun(@(x) x(1,1)~=x(2,1)...

9年弱 前 | 0

回答済み
Percentage change and plot
You may want to store the output in a matrix though, for n=1:size(cbf,2)-1 percentage(:,n)= ((cbf(:,n+1) - (cbf(:,1))) ....

9年弱 前 | 0

回答済み
Determine identical value of a column
You could use <https://de.mathworks.com/help/matlab/ref/findgroups.html findgroups> and <https://www.mathworks.com/help/matlab/r...

9年弱 前 | 0

| 採用済み

回答済み
Removing values so two vectors are the same length
Why don't you put those two vectors (time and data) in table (or even better in a timetable, if you're using 2016 or later) befo...

9年弱 前 | 0

回答済み
Having trouble creating a conditional function
Just use x = -1:0.1:1; f = x.^2.*sin(pi.*x); and then to create g based on f g = f; g(g<0)=0;

9年弱 前 | 0

回答済み
absolute value of negative real numbers
Probably you've created a variable called abs in the workspace. Try clear abs abs(-1)

9年弱 前 | 2

| 採用済み

回答済み
area between two overlapping plots
You could use |trapz| to calculate the area under the curve. <https://www.mathworks.com/help/matlab/ref/trapz.html> But be...

9年弱 前 | 0

| 採用済み

回答済み
how to calculate final minimum in for -loop?
I suppose this is a homework and you're not allowed to use in-built functions like <https://www.mathworks.com/help/matlab/ref/mi...

9年弱 前 | 0

回答済み
Display name associated with max number in a while loop.
Import your data as table using readtable, it is so much easier. There's a perfect example for you. T = readtable(fullfile(...

9年弱 前 | 0

回答済み
Concatenating horizontally two cell arrays
If you want to retain the zeros in the beginning why not store them as char? A{1,1}='00016510'; B{1,1}='0'; C=horzcat...

9年弱 前 | 0

回答済み
Cancer dataset file with selected feature with 495 row and 8 column 495x11
Something like this, data = csvread('k1000Refine8.csv'); %import data data_sorted = sort(data,2); %sort them along colum...

9年弱 前 | 1

| 採用済み

回答済み
How do you allow a user to input a .csv file?
If you want to import data from this file, data = csvread('yourfilename.csv') if you want user to pick the file using a ...

9年弱 前 | 0

さらに読み込む