Respondida
Display a value from a Matrix based on user input
Note that your mykey is a string array. We typically use the term matrix only when referring to numeric arrays. Also note that ...

más de 6 años hace | 0

Respondida
Error using imwrite in the following code
Yes, the documentation of imwrite doesn't say that you can path as input a folder and a filename. That's because you can't. imw...

más de 6 años hace | 0

Respondida
For loop using unique values
Indeed using find would be madness. For the record, find is over used by beginners and is rarely needed. For that matters, for l...

más de 6 años hace | 0

| aceptada

Respondida
Need help plotting multiple graphs
Please, don't post screenshots of code. We can't copy/paste screenshots into matlab to test your code. Post the code as text (an...

más de 6 años hace | 0

Respondida
Calculate the mean of nonzero pixels
The loop was pointless to start with. All you're doing is: m = mean(volume .* mask, 'all'); %don't use mean as a variable name...

más de 6 años hace | 1

| aceptada

Respondida
How to replace/delete some elements of a Matrix to a certain value
yourmatrix(randperm(numel(yourmatrix), numel(yourmatrix) * 0.1)) = 0; %replace 1/10th of the elements chosen at random by 0

más de 6 años hace | 0

| aceptada

Respondida
Replacing elements in a vector
So, simply subtract 59 from your vector: newvector = yourvector - 59;

más de 6 años hace | 1

Respondida
I was looking for the code for the sample appdMemoryMonitorExample and could not find it
openExample('matlab/AppdMemoryMonitorExample') at matlab command prompt.

más de 6 años hace | 0

Respondida
Error Index exceeds the number of array elements (151).
You define x as a vector of 151 elements: integers from 0 to 150, then you do: y = x+1; This defines y as a matrix the same s...

más de 6 años hace | 0

Respondida
How to add another column
yourtable.Age = yourtable.Rings + 1.5; by the sound of it. If not, then attach an example of your data as a mat file.

más de 6 años hace | 0

| aceptada

Respondida
GUI: How do save data from one callback to another ?
The handles structure that your callback receives is meant exactly for this: %It's a good idea to create the variable used in t...

más de 6 años hace | 1

| aceptada

Respondida
addpath from a different subfolder of the same parent directory
Data folder should never be added to the search path. It's dangerous (you may change what functions are in scope) and there's no...

más de 6 años hace | 0

| aceptada

Respondida
What is best option to separate bytes from hex vector (char vector)?
Assuming that the number of characters is even: split = mat2cell(A, 1, repelem(2, numel(A)/2)) Note that this will produce a c...

más de 6 años hace | 0

Respondida
RSVP : REPLACE LETTERS WITH DIGITS
s = 'A':'Z'; %condition 1 numletters = randi([13, 21]); %number of letters to select is a random number from 13 to 21 lette...

más de 6 años hace | 1

| aceptada

Respondida
I would like to get matlab user guide
You can get the pdf documentation at: https://www.mathworks.com/help/pdf_doc/matlab/index.html. You will need to be logged into ...

más de 6 años hace | 0

| aceptada

Respondida
Change names of files in a folder
In some ways your code is very well written with variable names that are descriptive and the correct functions used. In some oth...

más de 6 años hace | 0

| aceptada

Respondida
Issues with Converting dates into the right datetime format
'Format' specifies the display format of datetime. It does not specify the format of the input to datetime. You specify this for...

más de 6 años hace | 0

| aceptada

Respondida
datastore multiple delimiter (space, tab)
I should have spotted that straightaway, the way to specify control characters is with a backslash \, not a forward slash /. ds...

más de 6 años hace | 0

| aceptada

Respondida
Can i save excel files in app designer
You can save any variable of your App to excel, using either xlswrite or writetable. %... in the app class function SaveToExc...

más de 6 años hace | 0

| aceptada

Respondida
Symmetric binary matrix with diagonal 0 values
Guaranteed to work on the first try: Msize = 10; %size of square matrix N = 20; %number of ones on each side of the diagonale...

más de 6 años hace | 0

| aceptada

Respondida
Change Matlab Version from R2014a to R2018a
If you're going to upgrade, you may as well upgrade to the latest version, currently R2019b. Code that worked in 2018a should wo...

más de 6 años hace | 0

Respondida
Index exceeds the number of array elements. Please Help?
Does anyone have any idea why i get the following error on line 15 Because the x you passed has less than 300 elements. Since i...

más de 6 años hace | 0

Respondida
Output must be a column vector
It looks like your error message comes from an ODE solver. It's the ODE solver that calls your function, so it's unclear what yo...

más de 6 años hace | 0

Respondida
Vectorisation of code for insertion of n x n matrices in a 3D array along the diagonal of a large matrix
Note: I don't see how you can get a 4 at M(2, 1) if maxRand is 3. Here is one way, no guarantee that it's faster than a loop. W...

más de 6 años hace | 0

Respondida
Timer Interrupt in App Designer
app.t.TimerFcn = @app.DisplayFPS; %<--DisplayFPS is a method of the app, so must be called with app argument

más de 6 años hace | 1

| aceptada

Respondida
parking space using IMAGE PROCESSING
You've cut the error message and removed the most important bit, the last part which told you which line of your code is respons...

más de 6 años hace | 0

| aceptada

Respondida
Adding elements of a matrix based on an if condition
There is no rblush in your code. Note that sum(scalar_value) is simply scalar_value. The code you've written does not work at a...

más de 6 años hace | 0

Respondida
Help with using summation functions in matlab (Trying to create an atomic scatter function)
function scatterfactor = calculatescatteringfactor(Z, s, a, b) assert(numel(s) == 1, 's must be scalar'); assert(isequ...

más de 6 años hace | 0

Respondida
find second minimum in a row in matlab without sorting
Use mink A = [ 3.5 2 1.6 1.456 0 1.9 2.6 ; 3.8 2.6 3.9 0 6 1.564 0 ]; minvals = mink(A, 2, 2); %first 2 miminums along dimen...

más de 6 años hace | 2

Respondida
How to read .txt file and convert the characters of .txt into cell formation
You ought to read the documentation of the functions you use if you don't know how they work. fopen doesn't read a file. All it ...

más de 6 años hace | 0

Cargar más