Réponse apportée
How to read/extract a part of a cell array from a .mat file?
If you have mat-file Version 7.3, try this but I've never tried it personally, exampleObject = matfile('filename.mat'); A ...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
Using values in an array to represent characters?
Use datetime to generate a vector of datetimes and then use |month| property, dt = datetime([2017*ones(12,1) (1:12).' ones(...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
While loop and previous values
I suppose |y| is a constant 3x1 vector and only |x| is changing in this while loop. So simply assign the intial values of |x| to...

plus de 8 ans il y a | 0

Réponse apportée
how to arrenge timeseries data ?
use sort? [~,indx] = sort(data(:,1)); sortedData = data(indx,:);

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Global variable not working in the MATLAB workspace
why do you want to use Global variables in the first place? _...I have never seen MATLAB code where globals were the right th...

plus de 8 ans il y a | 0

Réponse apportée
Subscripted assignment dimension mismatch
You're trying to assign a 3D matrix into a 2D one. Try, masking(:,:,:,1) = indx;

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How can I re-write this code to fit any size matrix? Help!
You're complicating a simple one line calculation way too much. Here's how to do it effectively, sectionGrades(:,end+1) = su...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Showing data values on markers in figure
use |text| <https://de.mathworks.com/help/matlab/ref/text.html> something like for t = 1:numel(x1) text(x1(t)+0....

plus de 8 ans il y a | 3

Réponse apportée
How to increase elements of a vector without changing its plot?
If you have X = rand(57,1); %57 elements if you want to have 3000 elements now, X(end+1:end+3000,1) = rand(3000,1); ...

plus de 8 ans il y a | 0

Réponse apportée
How can I interpolate the 2-dimensional data
something like this maybe, a = [81 83 85 87 90 84 0 88 90 92 83 85 86 0 91 86 87 88 92 94 88 89 90 96...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How can I add additional tics to the x-axis scale in my graph?
If you're using older version of matlab, set(gca,'xtick',0:20:700); and to draw vertical lines, line([x1 x2],[y1 y2]...

plus de 8 ans il y a | 1

Réponse apportée
Latest Date Entry Record
use sortrows, <https://de.mathworks.com/help/matlab/ref/sortrows.html#bt8bz9j-2> sortedTable = sortrows(yourTable,'timest...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
"For" loop to test every value and count the points that satisfy the statement
you need to read about if statements <https://de.mathworks.com/help/matlab/ref/if.html> and also indexing, <https://de...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How to delete rows in a table where table variable equals some integer?
if |T| is your table, T(T.Variable == 1,:) = [];

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Fail to create a new variable in the Timetable
if |Data| is your timetable, you cannot just say Data.Rate = Data{datestr(n),3} or Data.Rate = 3.686 Pre-allocate the new...

plus de 8 ans il y a | 0

Réponse apportée
Check elements in cell
No need for a loop, just use find and strcmp, indx= find(strcmp(NAME_T, 'Del Col_2010'))

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
Average of column for values of other columns
data = [240 1 0 1 18 240 1 0 1 26 240 6 7 3 23 240 28 22...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to use xls functions whitout excel installed?
The documentation for |xlswrite| says, _If your computer does not have Excel for Windows®, or if the COM server (part of th...

plus de 8 ans il y a | 0

Réponse apportée
Grid on in subplot
You may want to use |linkprop|, <https://www.mathworks.com/help/matlab/ref/linkprop.html> hlink = linkprop([ax1 ax2], {'G...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to recieve only the negative or the positive of an integer?
One way is, your_integer = 3; number = randsample([-1 1],1)*your_integer

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
I am using matlab file in which i am able to create the new folder according to the time, but the thing is i want to copy the files from a specific file to this newly made folder according to time.
use |movefile| or |copyfile| <https://www.mathworks.com/help/matlab/ref/movefile.html> <https://www.mathworks.com/help/mat...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
how to add zeros around a matrix?
newA = zeros(size(A)+2); newA(2:end-1,2:end-1)=A

plus de 8 ans il y a | 1

Réponse apportée
How to make a loop if a condition is not met
You have got it almost right but you have to have the while loop on top to ask the user untill non zero values are received. Ins...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Extract last column in a 4x4x4x4 matrix
I do not understand the connection between your title and the content of your question. Anyway if you want to extract the last c...

plus de 8 ans il y a | 0

Réponse apportée
Print message about which loop has been entered, after finishing for loop
set counters and use it with disp counterA = 0; counterB = 0; counterNone = 0; for k=1:10 %code if (condition ...

plus de 8 ans il y a | 0

Réponse apportée
how to use the loop for?
you have got it almost right, you just need to put them inside the loop. I'll give you some tips to work further. * first ass...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
how can i obtain this ?
Simpler with just one line, bsxfun(@plus,1:9,(10:10:90).')

plus de 8 ans il y a | 0

Réponse apportée
How to force the colorbar to adopt n values?
Always use a handle, <https://www.mathworks.com/help/matlab/learn_matlab/understanding-handle-graphics-objects.html> When ...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How can I change the color of all similar blocks in a complex simulink system programmatically?
use findblocks to get all blocks of your model, <https://www.mathworks.com/help/simulink/slref/find_system.html> and then ...

plus de 8 ans il y a | 0

Réponse apportée
Load csv with date-time column and other colums with numbers and changing date-time to number.
If you have 2013b or later use readtable, <https://www.mathworks.com/help/matlab/ref/readtable.html> data = readtable('fi...

plus de 8 ans il y a | 0

Charger plus