Réponse apportée
Reading Specific Data Into MATLAB from an Excel File
One way: opts = detectImportOptions('Static_pose.xlsx'); %should automatically figure out what part of the excel file is a tab...

plus de 7 ans il y a | 0

Réponse apportée
Intersection of two matrices based on 1st column
[~, rowstokeep] = setdiff(B(:, 1), A(:, 1)); %get index of rows in B whose 1st column is not in 1st column of A C = B(rowstoke...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Warning while opening matlab R2018b
The most important part of the error is probably: Warning: Function assert has the same name as a MATLAB builtin. We suggest yo...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to efficiently replace NAN with Numirical value a reference vector
Certainly, the inner for loop is unnecessary (and the find, use logical indexing). Refr=[1 20 1 4 5 2]; WithNan=[1 NaN 1 3 2 ...

plus de 7 ans il y a | 3

Réponse apportée
To change 12x12 matrix to 6X12
No need for a loop: m = randi([0 100], 12) %demo matrix newm = permute(sum(reshape(m.', size(m, 2), 2, []), 2), [3 1 2]) B...

plus de 7 ans il y a | 1

Réponse apportée
Removing zeros in excel
No loop, no cellfun: filetoedit = 'C:\somewhere\somefile.xlsx'; [data, ~, ascell] = xlsread(filetoedit); ascell(~conv2(data...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
undefined function or variable matlab even the variable excite
A will only exist if both n and m are greater than 2. So if matlab tells you that A does not exist we can safely assume that eit...

plus de 7 ans il y a | 0

Réponse apportée
number of special array in a table
It doesn't look like you have a table. It looks like a plain vector. Anyway, lengthofruns = diff([1; find(isnan(yourvector)); ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
what happens to Matlab when I lose connection to my network drive data all of a sudden?
As YT said, fixing the problem may be a more efficient use of your time than trying to work around it. Assuming you have enough ...

plus de 7 ans il y a | 2

Réponse apportée
Index in position 1 is invalid. Array indices must be positive integers or logical values.
When you give an error always give us the full text of the error message so we don't have to guess which line is causing the err...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
i have a matrix A of size 523418*2, i want to delete repeating pair?? as i explained below. any help??
[~, tokeep] = unique(sort(a, 2), 'rows', 'stable'); %stable optional if you don't care about the ROW ordering result = a(tokee...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
for loop with 3 variables
I would recommend that you avoid using more characters than you need to. Xvirtual = 250:10:300; %no point in the [] length(xq...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How can I prevent an infinite recursion within my program?
How can I prevent an infinite recursion within my program? Completely rethink your function HionpH. I have no idea what that fu...

plus de 7 ans il y a | 0

Réponse apportée
How can I create a moving average filter for two columns of arrays?
As said, use movmean, your particular equation is simply y = movmean(x, M) possibly with a different 'Endpoints' method than t...

plus de 7 ans il y a | 1

Réponse apportée
fints toweekly vs timetable retime
I'm afraid that retime is not a suitable replacement for what you did and I doubt it will ever be. However, I also don't think ...

plus de 7 ans il y a | 0

Réponse apportée
How can I read a large Excel sheet with low runtime?
First, why is it such a worry? Are you reading that spreadsheet in a loop? If so, why? Does it change each time? If not, why doe...

plus de 7 ans il y a | 1

Réponse apportée
Variable number of input matrices in a function
N = 4; A_1 = sparse(1:N,1:N,-1*ones(N,1),N,N+1); A_2 = sparse(1:N,2:N+1,1*ones(N,1),N,N+1); A = A_1+A_2; blkdiaginputs =...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to start different LabVIEW version with actxserver
I don't have labview 2016 installed so can't check but it's probably going to be: actxserver('LabVIEW.Application.7') If not, ...

plus de 7 ans il y a | 0

Réponse apportée
How can I merge vector elements into a single number of type double?
k = polyval(v, 10) is probably the easiest. This assume of course that each element of v is an integer in the range [0-9].

plus de 7 ans il y a | 4

| A accepté

Réponse apportée
I'm trying to compare data from excel sheet with data obtained and extracted in matlab
How can i do that using xmlread and xmlwrite? Why do you think that xlmread or xmlwrite are relevant here? Your data is not xml...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Why do I get an error message "Function value at starting guess must be finite and real." when my starting guess is 8?
Well, as said, global variables makes it difficult to debug. I'm certainly not going to bother trying to figure what are the val...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
hourly average for the monthly data
Unless you're using a very outdated version of matlab, there's a much easier way to do everything you've done t = readtable('ja...

plus de 7 ans il y a | 0

Réponse apportée
Distribute matrix elements to smaller grids.
Easily: M = [10 20; 30 40]; scaling = 2; repelem(M/scaling^2, scaling, scaling)

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to solve Reference to non-existent field 'a '. Error
It's nteresting that you get a 'non existent field' error. Newer versions of matlab throw an 'invalid field name' error instead ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
'Value' must be a double scalar error?
Trying things at random (such as str2ouble) is not a good way to solve problems. The error message is clear, Value must be a sca...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
swap values of an array
Trivially done: O = [11 12 13 21 14 22 23 31 25 24 32 33 34]; v = [5 10]; O([v;v+1]) = ...

plus de 7 ans il y a | 4

Réponse apportée
how to use function and ode45
i got a complex numbers! [...] .the question is why!? You're taking the root of a negative number , Or you're calculating the ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
How can I multiply all the elements extracted from an excel file with a particular value?
1) Rather than single letter variable names, use complete words that explain what the variable contain. That will make your code...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Problem when using retime
You can't use retime for that. retime is designed to work with timetables that can have more than one variable. In this case, it...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Finding the set of unique values for another set of unique values
i am looking for an array type [...] can it be filled with NaN or zeros? NaN is probably wiser. M = [ 1,3;1,3;1,4;2,5;2,4;3,1;...

plus de 7 ans il y a | 1

| A accepté

Charger plus