Question


Unexpected slowdown using () indexing
format long g NULL = 0; counter = 0; start = tic; while toc(start) < 10; NULL; counter = counter + 1; end; counter/10 NULL =...

3 years ago | 1 answer | 3

1

answer

Answered
Upper bound curve that passes through the extreme (highest) points
Use boundary possibly changing the alpha coefficient.

3 years ago | 0

Answered
Unable to populate trip usage tripusage=zeros(1,288) with my result tripusage(k)= (p1*x^2 + p2*x + p3) *fivemindist;
x=temp{k}; variable temp with lower case T is not defined. You have a variable Temp with upper case T

3 years ago | 0

Answered
Writetable logical table to excel as zeros and ones
Write out double() of the logical array.

3 years ago | 0

Answered
Transformation this equations to equations MATLAB
Use sin() and cos(). Powers are .^ Dot to multiply is .* Use () for grouping and priority There is no implied multiplic...

3 years ago | 0

| accepted

Answered
How to find the number of non-NaN elements in a column that are NaN in the last column, in MatLab?
isnan(YourMatrix(:, 3)) & ~isnan(YourMatrix(:, 4))

3 years ago | 0

Answered
How can I measure the time it takes to break a cryptographic algorithm by brute force attack?
timeit() However unless you deliberately using a very small key, you would need to estimate the time instead of measuring it....

3 years ago | 0

| accepted

Answered
How to set the same grid size of the axis for different plots?
https://www.mathworks.com/help/matlab/ref/pbaspect.html https://www.mathworks.com/help/matlab/ref/daspect.html You can set t...

3 years ago | 1

| accepted

Answered
How to enlarge/Scale/Increase size of a contour plot
The contour plot is made as large as possible as will fit inside the axes after taking into account axes labels and tick labels ...

3 years ago | 1

| accepted

Answered
Could someone help me to import individual jpeg images embedded in a gif image into each slide in a PowerPoint file? I use exportToPPTX.
Images = imread(Gif, 'frames', 'all'); .gif files are always indexed images. In the special case that the frames were grayscal...

3 years ago | 0

Answered
Viewing Symbolic Matrix Entries in Variable Tab?
No, No there is no way to do that. If you temp = arrayfun(@char, YourSymArray, 'uniform', 0); openvar temp then you will be ...

3 years ago | 1

| accepted

Answered
How to simplify too much of if
Use look-up tables. For example the final elseif can be encoded as {[40 50 55 60 42 45 80 35 37] [40 41 44 60 32 36 80...

3 years ago | 0

Answered
Is there a way to reduce Timer period to less than 1 ms?
You would need to reimplement timers.

3 years ago | 0

| accepted

Answered
Find doesn't seem to work with Matrix larger than 127x127
I am certain that find works. I speculate that you are putting the values together in an array with values of datatype int8. Whe...

3 years ago | 2

| accepted

Answered
Accessing the url address of images in Matlab Drive
The files on matlab drive cannot be remotely accessed individually. Even if you publicly share a folder, the share mechanisms do...

3 years ago | 0

| accepted

Answered
How can I find the Time for specific values of Voltage (with a small tolerance)?
find(abs(data-target)<=tolerance) Or ismembertol()

3 years ago | 0

| accepted

Answered
I would like to extract x,y,z coordinates of any 3 atoms from a pdb file. How to rectify this error and make it generalized?
% N = range of indices for example N=1:7; Q = [ubq.Model.Atom(N).X; ubq.Model.Atom(N).Y; ubq.Model.Atom(n).Z].'; This...

3 years ago | 1

| accepted

Answered
Dynamic plot in real time
pick nominal x coordinates for the endpoints of the see-saw. Create a line that has those as the x coordinates and has the "curr...

3 years ago | 0

Answered
Error: File: project_01.m Line: 61 Column: 26
elseif Hexa_number_small = Hexa_row_small * (Hexa_number - 1); elseif must be followed by a condition, not an assignment.

3 years ago | 0

Answered
Error in ode45 (line 115) odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
delta = 1; That is a numeric scalar. Valid indices for it are numeric 1, logical true, logical false, and the empty vector....

3 years ago | 0

Answered
Why do I get unrecognized function or variable when calling constructor in app designer
TFeature is not a property or method of the class, and it does not exist at the time the properties list is being parsed. It is ...

3 years ago | 0

Answered
saving figures to a video with VideoWriter
getframe() with no options is not guaranteed to return the same size each time. In practice the size of an axes can vary by (if ...

3 years ago | 1

| accepted

Answered
How can I specify the dimension of a differentiated function?
diff() is generally successive differences. It is only derivative if the first parameter is sym or symfun, both from the Symboli...

3 years ago | 0

Answered
Finding a redundant pattern in a matrix
C1=[ 5 9 3]; C2=[ 9 5 3]; C3=[9 5 9 3]; C4=[5 9 8 3]; C5 = [5 3 9 8]; is_in(C1, C2) is_in(C1, C3) is_in(C1, C4) is_in(C1, ...

3 years ago | 0

| accepted

Answered
Connecting to USB device with serialport vs. serial command
serialport does not have any fopen() or fread() . It automatically opens the port when you create the object, and it uses read()...

3 years ago | 1

Answered
Empty matrix, scalar, or vector function in loop
MATLAB uses == for comparisons, not = Also, X = [] Y = 1 if X == []; disp('X yes 1'); end if Y == []; disp('Y yes 1'); end ...

3 years ago | 0

| accepted

Answered
Numeric data becomes zero after conversion from Table
I predict that you have format short in effect, and that what is being displayed is not really 0 but is instead something of t...

3 years ago | 0

| accepted

Answered
Why results of the 'solve' are wrong?
p_max=715.685424949238; (and a bunch of other numbers). What does that input mean? Does it mean that p_max is exactly ? Does ...

3 years ago | 1

| accepted

Answered
Excel sheet data upload "Invalid 'DataRange'. The column size must match the number of variables".
opts.DataRange = "A2:AT78"; That requests that column "A" to "AT" be read in. However, M1_New_Macro1.xlsx only has data up to c...

3 years ago | 1

| accepted

Answered
Logical operator not evaluating correctly
A|B is an or test and returns a logical value -1 is nonzero which is considered true, and since you or everything together you a...

3 years ago | 0

Load more