Respondida
Callback slow when large object array loaded into function context
I suspect you meant JH=JustHandle.MakeArray(200000); I can't explain the behaviour, however note that load is known to preven...

alrededor de 7 años hace | 1

| aceptada

Respondida
cant find the white pixels
I suspect you're getting confused with your coordinates. In particular, the names of the variables in your line: [c, r] = find(...

alrededor de 7 años hace | 0

| aceptada

Respondida
How can I call an event Function in AppDesigner
Ah, so you want to call a control from the statupFcn, that makes more sense. If you're not using the event argument in the func...

alrededor de 7 años hace | 1

| aceptada

Respondida
change a value in matrix
Note that idx = randi(size(A, 1)); would make more sense than randperm with just one element output. Anyway, randomrow = ran...

alrededor de 7 años hace | 0

| aceptada

Respondida
how to get rgb value of image (using col,row) in app designer?
ginput does not round the clicked coordinates to the nearest integer, so you'll have to do that yourself. Also check that that t...

alrededor de 7 años hace | 1

| aceptada

Respondida
Saving images with a new name extracted from the old image name
One possible way, baseFileName = '2019-03-14 11-15-49.498_CAM2_4_3.bmp'; %for example outputFileName = regexprep(baseFileN...

alrededor de 7 años hace | 0

| aceptada

Respondida
save part of a stucture
The -struct option of save saves each field of the structure as individual variables. Obviously for that to work the structure h...

alrededor de 7 años hace | 3

| aceptada

Respondida
Invalid file identifier.Use fopen to generate a valid file identifier.
You don't show where fid comes from, but clearly matlab failed to open the file you tried to open. There can be many reasons for...

alrededor de 7 años hace | 0

Respondida
How could I change this Python code to Matlab?
As Rik says there's no tool to convert python code into matlab so you'd have to do that manually, first by understanding what th...

alrededor de 7 años hace | 1

Respondida
Extracted Features in .MAT files
It's hard to give you proper code without knowing the exact code you're using. It would go something like this: samplesigna...

alrededor de 7 años hace | 0

| aceptada

Respondida
How can delete matrix randomly?
It looks like you've deleted rows not columns. y(randperm(size(y, 1), 3), :) = []; %delete 3 rows at random y(:, randperm(si...

alrededor de 7 años hace | 0

Respondida
how to calculate derivative of a string
Replace your str2func, by str2sym to create a symbolic expression: eq='x^2+x'; f = str2sym(eq); g = diff(f);

alrededor de 7 años hace | 0

Respondida
matrix log of certain columns
Simply, result = log(matrix1) + log(matrix2); then, result(:, 1) is your log(m1c1) + log(m2c1), result(:, 2) is your log(m1c2)...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to seasonalise daily weather classification and precipitation data
Up on the right of the page, there is a field for you to tell your version of matlab. Since it's not filled, I'm assuming a mode...

alrededor de 7 años hace | 1

| aceptada

Respondida
Is it Possible to Assign Aligned Memory to a *mxArray?
It is most likely that matlab arrays are already aligned but in any case, you can't use your own memory allocator for matlab arr...

alrededor de 7 años hace | 2

| aceptada

Respondida
Logical Indexing: Using a 1x18 array to build a 200*18 matrix
Simply: rebuildcost = sum(failmatrix .* costmatrix, 2);

alrededor de 7 años hace | 1

| aceptada

Respondida
sample rate (Fs) in audiowrite
Yes, the documentation does not match the actual code of audiowrite, at least in R2018b and R2019a. The documentation states tha...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to set an array identifier within code
Trying to build the indices as text is never going to be efficient. What you want can be trivially obtained: %A: an N-d matrix ...

alrededor de 7 años hace | 1

| aceptada

Respondida
How replace NaN's in a 3d field with the nearest value in the same column?
fillmissing(your3darray, 'previous', 3) %fill nans with previous element along 3rd dimension Possibly, with an optional 'EndV...

alrededor de 7 años hace | 0

Respondida
How can I efficiently generate an incidence matrix based on Euclidean distance?
Sure you can process it in blocks: centrestep = ??? inputstep = ??? centreblocks = ceil(numel(centres) / centrestep); i...

alrededor de 7 años hace | 0

| aceptada

Respondida
sscanf to extract numbers from string
sscanf format is different from sprintf. In particular there's no .2 notation for %f, so your .2 is interpreted as a literal .2 ...

alrededor de 7 años hace | 0

Respondida
Find all possible combinations of 2 vectores (spin) of a system with N atoms with pondered distance
You have to bear in mind that most of us probably don't work in the same field as you do. Last time I had to worry about atom sp...

alrededor de 7 años hace | 1

| aceptada

Respondida
Obtaininig an array, which corresponds to one one of the diagonals of a given matrix, without using loops
Use the diag function: M = [1 2 0 8 5 1 2 3 8 7 8 5 0 3 5 6 7 4 8 2 1 2 0 4 5] >> diag(M, 2) %...

alrededor de 7 años hace | 1

| aceptada

Respondida
TRANSPOSE(.') / RESHAPE too much TIME CONSUMING--> Looking for ALTERNATIVE
I fund it really weird that, for a computer, selecting a simple raw from a matrix is that time consuming It's always a lot slow...

alrededor de 7 años hace | 0

| aceptada

Respondida
read inconsistent ascii file to matrix
Unfortunately, there's no ignore invalid lines for textscan, so you're going to have to parse the file line by line, or implemen...

alrededor de 7 años hace | 0

Respondida
Unable to tweet from Matlab
According to this example, the base url to post tweet is baseurl = 'https://api.twitter.com/1.1/statuses/update.json'; not th...

alrededor de 7 años hace | 1

| aceptada

Respondida
MATLAB Coder regexp Alternative
I know nothing about coder, don't have the toolbox. Reading the documentation of coder.ceval, I find it very incomplete. It ment...

alrededor de 7 años hace | 0

Respondida
find the onset of a task in an array with the use of for loops
A loop would be a waste of time: function [event_scan_number, event_value] = function1(E) %what a rubbish function name! What ...

alrededor de 7 años hace | 1

Respondida
Index in position 2 exceeds array bounds (must not exceed 6).
Your code: word1 = {'A','L','P','A','C','A'}; so, word1 is a 1x6 cell array, 1 row, 6 columns search = 10; for p = 1:search ...

alrededor de 7 años hace | 1

| aceptada

Respondida
how can MATLAB handle .NET methods that have a REF parameter?
If we go by your .Net code, the correct matlab version should be: id = int32(0); %you probably don't even need the int32. mat...

alrededor de 7 años hace | 0

| aceptada

Cargar más