Réponse apportée
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...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 1

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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....

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 1

Réponse apportée
How to remove rows that meet a condition?
allOptions(allOptions(:,1)>=allOptions(:,2),:)=[];

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 1

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Find a specific number in an imported excel sheet
[rowind,colind] = find(B(:,1)==9 & B(:,2:end)==14.38) Do you mean this?

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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'...

environ 9 ans il y a | 0

Réponse apportée
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') ...

environ 9 ans il y a | 0

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 0

Réponse apportée
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...

environ 9 ans il y a | 0

Réponse apportée
Position of an element in a vector
[row,col,v] = find(z==-2)

environ 9 ans il y a | 0

Réponse apportée
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)...

environ 9 ans il y a | 0

Réponse apportée
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))) ....

environ 9 ans il y a | 0

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
I am trying create a loop that will find the value of an element in m and in x then multiply them by each other, but every time j reaches 2 ( regardless of the size of the vector) it will give me this message: Index exceeds matrix dimensions. Error
You don't need those for loops. % get the inputs from user and also make sure % they have the same number of elements ...

environ 9 ans il y a | 1

Réponse apportée
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...

environ 9 ans il y a | 0

Réponse apportée
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;

environ 9 ans il y a | 0

Réponse apportée
absolute value of negative real numbers
Probably you've created a variable called abs in the workspace. Try clear abs abs(-1)

environ 9 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 0

Réponse apportée
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(...

environ 9 ans il y a | 0

Réponse apportée
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...

environ 9 ans il y a | 0

Réponse apportée
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...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 9 ans il y a | 0

Charger plus