Réponse apportée
Why am I getting error asIllegal use of reserved keyword ''end"
Probably because you have an end without a starting if. Even ignoring that line 1 and 4 should be a comment, I'm afraid to say y...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Convert string array to datetime
Yes, there's no 'T' in your input so the format should be 'yyyy-MM-dd HH:mm:ss.SSSSSSSSSXXX' >> s = "2016-07-22 10:02:54.087216...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
How to extract submatrix from the Main matrix???
If you have the image processing toolbox: subnatrices = struct2cell(regionprops(logical(Z), 'Image'))

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to compare array's values with each other?
It's unclear how you get your error if your i and j were just created with a for i = 1:m and for j=1:m. They're clearly somethin...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Transform cells to matrix
Assuming that the x, y and z are indeed integer as in your example, from 0 to Nx, Ny, Nz, then the easiest way may be: result =...

environ 7 ans il y a | 0

Réponse apportée
Return all possible Cuts of array A If you have defined number of parts M
"empty partitions are allowed" I assume you mean not allowed, otherwise your solution is missing two cuts. %V: a row vector to...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Can MATLAB convert text file to RPC III format ?
If you're talking about this format: https://www.mts.com/cs/groups/public/documents/library/mts_007569.pdf, then I don't see how...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How can i set the color of segmented image staticly in matlab ?
You can pass your own colour map to label2rgb but I don't think that's what you're asking. label2rgb assign colours to objects ...

environ 7 ans il y a | 0

Réponse apportée
Extract data from a cell array/struct
What I want to do is to extract the third column of the data field from each struct within the cell array and complile it into a...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
cell to matrix conversion with a slight modification
Assuming that you mean a 501x16 matrix, then: m = reshape(cat(3, yourcellarray{:}), [], numel(yourcellarray)).' This concatena...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Index in position 2 exceeds array bounds (must not exceed 1)
a) get rid of all the unnecessary brackets that make it harder to read your expressions x = [indexbase(1,1), indexknuckle1(1,1)...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
question about vectorization using indexes
Another option is to append a 0 (or any finite value) to the start of a and increase ind by 1, so a(ind+1) is always valid. Assu...

environ 7 ans il y a | 0

Réponse apportée
Sending data via udp. Would appreciate help with the proper way of converting a cell array containing char, string, double to ASCII data
strData = string(DATA); for row 1:size(strDATA, 1) strrow = strjoin(strDATA(row, :), '\t') + char(10); fwrite(updMoni...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Fill table of NaNs with data though loop
It's not clear what you're doing in the loop. Possibly, you should be using rowfun, groupsummary or similar instead of an explic...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Finding exact rank of a matrix element
look up the elements of vector B in column 2 of A to get the corresponding values in column 1 of A. But A and B are dismilar in ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Summin elements on the rows of a specific page of a matrix
B = sum(A(:, :, 1), 2); %sum 1st page of A across the columns (across the 2nd dimension)

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Copy part of an RGB image to another
I really don't understand why you went with this very roundabout code, very little of it makes any sense: e.g: idx = zeros(siz...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to do one hot encoding of unusual letters in matlab?
file containing the characters that I want to one hot encode. Do you know how I can go about now %phoneme_set: A cell array of ...

environ 7 ans il y a | 0

Réponse apportée
add jpeg toolbox in matlab 2014a
I know nothing about that toolbox but all these missing symbols looks like symbols from libjpeg. I assume it's a dependency of t...

environ 7 ans il y a | 0

Réponse apportée
stlwrite error: Tetrahedron triangulation is not supported.
A 3D alphashape is a volume, therefore its triangulation is made of tetrahedrons not triangles. stlwrite only supports triangula...

environ 7 ans il y a | 4

| A accepté

Réponse apportée
how to interpolate a value from an excel file depending on an input and then assign the result to a variable.
In modern matlab, I'd recommend you use readtable instead of xlsread, particularly if your excel file has column headers since t...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
What is wrong with this code?
Well, we can tell you what could be wrong with your code, but since you've given us absolutely no information about what it's me...

environ 7 ans il y a | 2

Réponse apportée
How to calculate sum of pixel values in grey scale images.
Not many details are given, but shouldn't it be: sum(myROI(:)) %sum of all values in array myROI If on R2018b or later, you c...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Could anyone help me to solve the issue in the following code.
What I actually need is the ouput should be as follows: [ 0 0.2948 0 0 0.2310; 0 ...

environ 7 ans il y a | 0

Réponse apportée
I have a 4 nested for loops which I am not able to vectorize.
Ok, so you effectively have 6 dimensions here, the ii, jj, i, j, the f and debut, so we're going to have to work in 6D. Working ...

environ 7 ans il y a | 0

Réponse apportée
Create a list of images from subfolders with specific names using dir , strcat!
Very confusing code and confusing question. But It just gives the last years. Well, yes of course, in the loop you overwrite l...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Histogram using Date Stamps
Oh, if it's the histogram of the dates you want, then groupsummary may not be the best tool (sorry Adam!) histogram(yourdatetim...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
How to create a matrix that has zero in middle?
The line x(size(n)-A:end-1,size(n)-A:end-1)=0; is full of bugs. First, what is the output of size(n)? It's guaranteed to be a...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
"how to create a matrix of coordinates and how to calculate the distance b/w different coordinates of the same matrix w.r.t the any single coordinate element?"
It's not clear where your X and Y come from and it's also not clear how you want the points to be stored since you don't use val...

environ 7 ans il y a | 0

Réponse apportée
Delete rows with bad data and surrounding rows
First, the easiest and fastest way to implement criterion 1 is: todelete = any(B, 2); For criterion 2, since you just want to ...

environ 7 ans il y a | 1

Charger plus