Answered
How implement sine wave on zeros array containing only 1 and 0
If you use the Computer Vision Toolbox then you can insertShape into an array. That returns an rgb array so you would binarize i...

4 years ago | 0

Answered
Using parfor for reflection function
You define a function. Inside the function you use parfor. Inside the function you call itself recursively. That would attempt t...

4 years ago | 0

| accepted

Answered
Warning: Rank deficient, rank = 0... means what?
output=zeros(K,N); Before the loop you create output as a 2d array. for i=1:K output= randsample([A, B, C, D], N,...

4 years ago | 1

| accepted

Answered
Error with using the multiplication sign
Your t is a vector so t*t is matrix multiplication between t and itself. You need t.*t or t.^2 However you will need another ...

4 years ago | 1

Answered
why active contour always produce an error?
bw = activecontour(I,mask,200,'edge',1,.3); 'edge' is a positional keyword, not a name-value pair. There are no positional ...

4 years ago | 0

| accepted

Answered
Access contributor message threads on MATLAB Central
Mathworks does not keep track of the message contents. They probably have some internal security logs about who sent email to...

4 years ago | 0

| accepted

Answered
Changing voxel size of NRRD image
Use imresize3() with a scale factor of 0.0344/0.5 for the first two dimensions

4 years ago | 0

Answered
Current learning AlexNet Deep Learning, I am pretty sure my image size are correct but it seems that it doesn't acknowledge it.
Notice 277 compared to 227. I suggest that you use an augmentedDatastore to implement automatic resizing to 227

4 years ago | 0

Answered
Blank figure when using spy to display a large matrix
Works for me. A = round(rand(400, 500)); spy(A) I suggest you which -all spy to check whether you are using a third-party s...

4 years ago | 0

| accepted

Answered
For loop for Covariance of two vectors
Individual covariances between two points is always [0 0; 0 0] because there is a constant relationship between the two scalars....

4 years ago | 0

| accepted

Answered
import data from text file
If you readtable() then with that data, it should detect 3 columns, with the first one being datetime() and the second being dur...

4 years ago | 0

| accepted

Answered
Warning: Specific a UIAxes handle as a first argument (in App Designer editor)
You should provide the target of each graphics operation. % Just to populate the variables xTimeHour = 1:150; ySpeed = rand(1...

4 years ago | 0

Answered
Is there any way to monitor the memory usage of a specific software using MATLAB?
If you start a process using the .NET control System.Diagnostics.Process then the WorkingSet property should return the amount o...

4 years ago | 0

Answered
Names on x-axis in the excel file
plot( categorical(names), values)

4 years ago | 1

| accepted

Answered
logm and expm function
The problem you are running into is that you are assuming that log(exp(X)) == X for all X. However, that is only true for real n...

4 years ago | 1

| accepted

Answered
How can I code a loop program to show different folder of images after a pause of 4 minutes?
foldernames = {'cats', 'dogs', 'babies', 'llamas'}; numfolder = length(foldernames); images_cell = cell(numfolder, 1); for ...

4 years ago | 0

| accepted

Answered
I want to make a simulation model of the given function. Can you help me ??
If t is simulation time, then it will likely be non-integer, and you would be trying to index by a non-integer. If u were the s...

4 years ago | 1

Answered
How to read corresponding signal values in timetable arrays?
[~, torque_max_idx] = max(Toque.Data); torque_max_time = Torque.Time(torque_max_idx); temp_at_max_torque = interp1(Temp.Time...

4 years ago | 0

| accepted

Answered
Imagesc with datetime on x axis
Unfortunately, it is not supported to use datatime() objects for imagesc axes. datetick() is not for datetime() objects: it is ...

4 years ago | 1

| accepted

Answered
Why are my Gaussian distributions not properly being generated?
Y1 = randn(N1,-5,4); The numeric parameters to randn() are all sizes so you asked for an array that is N1 by negative 5 by ...

4 years ago | 0

Answered
functions at end of file - THEY ARE
semi-colon is not part of the end syntax. Your code is the same as if you had written function [f] = load(x,C1,C2) [f] = sqr...

4 years ago | 0

| accepted

Answered
Restarting loop from beginning based on condition?
Don't do that ;-) Instead, loop backwards. Each time you do a deletion, the elements after will "fall down" to occupy the remov...

4 years ago | 0

Answered
My graph is blank
Tested. Your .mat file does not contain anywhere near what you thought it does. Instead there is a 3 x 1 string array for each ...

4 years ago | 1

| accepted

Answered
How to extract data by looping through struct
S = dir(fullfile(outputDir,'*.mat')); S is the output of dir() fields = fieldnames(S) The field names returned by dir() incl...

4 years ago | 0

| accepted

Answered
Displaying a result from a matrix once reached a certain value
find(all(F_M1 < 1000, 2), 1)

4 years ago | 0

Answered
Audio recorded and playing back a sentance
If you have isolated words, w1, w2, w3, etc., each a column vector or N x 2 array (stereo), then: Fs = 8000; %sampling frequen...

4 years ago | 0

Answered
Reshape matrix with averages of 4 elements in each row
A = [ 0 2 2 4 0 6 4 6 1 1 2 8 0 0 4 0 9 9 2 8 0 0 0 8] B = reshape(mean(reshape(A.', 4, []), 1), [], size(A,1...

4 years ago | 0

| accepted

Answered
is there a way to make "short" variable in matlab?
The file goes like this: D8 00 EA 00 the real values goes like this: 40, -22 You are expecting two values, not 4 values, and yo...

4 years ago | 0

| accepted

Answered
Live functions versus function
Live Script allow a lot of annotation, including text and equations and images. That makes them well suited for tutorial-type us...

4 years ago | 0

Answered
Storing the strings of a table data while using a loop?
Use detectImportOptions() for the file, and use setvartype() 'string' for the columns containing mixed data. Afterwards you wil...

4 years ago | 0

Load more