Beantwortet
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 ...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 1

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

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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.

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 0

Beantwortet
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...

mehr als 6 Jahre vor | 2

Beantwortet
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 ...

mehr als 6 Jahre vor | 0

Mehr laden