Answered
how to plot a summation function in matlab using a for loop
It's a good start. You should only put the summation part in the loop, and you should store the results in a vector. (remembe...

10 maanden ago | 1

| accepted

Answered
Pre-allocating cell array of anonymous functions
You can pre-allocate the cell array itself, but the contents will have to be set in the loop itself: my_fun_array = cell(1,q_to...

10 maanden ago | 1

| accepted

Answered
express ODE without set a m file function
If you want to replicate the results, you need to replicate the function exactly: func=@(t,y,cd,m) [y(2);9.81-cd/m*y(2)*abs...

10 maanden ago | 0

| accepted

Answered
Unable to find function @(fd)(1/(1+A(fd/fdmax2)^2)) within E:\matlab\bin\hw3.m.
As you can see, the error here is different than what you report. Did you consider changing your function to have an output arg...

10 maanden ago | 0

| accepted

Answered
Date and time range picker from user
You might be interested in this example. You can easilly create an 'ok' button that will retrieve the set dates and times and cl...

10 maanden ago | 0

Answered
urlread for links in html database
You can use sprintf to form the URLs. n=21001; url=sprintf('%s%d.dat','https://gml.noaa.gov/aftp/data/radiation/solrad/abq/20...

10 maanden ago | 0

Answered
Renewal fee for matlab student version
There is no such thing as a renewal fee. You can keep using the student version of the release you purchased as long as you a...

10 maanden ago | 1

| accepted

Answered
Help to verify obtained plots from .txt file data.
You can find an explanation for the layout tools here. It is the toolbar you see when you edit your question. How did you try t...

10 maanden ago | 0

| accepted

Answered
ERROR: Array indices must be positive integers or logical values.
Actually, the result of your code is a missing variable. Once you fix that, you will have to edit your code to avoid X(0).

10 maanden ago | 0

Answered
Textscan function ignores final delimiter when token is empty
From what I can tell, this is intended functionality. It is unable to match the format specification to an empty array, so it is...

11 maanden ago | 0

Answered
How can I use codes downloaded in MATLAB file exchange?
With a sufficiently new release you can use the AddOn Manager to add submissions automatically. That should even take care of up...

11 maanden ago | 0

Answered
How to define row and column of element in grid layout while initializing
The point you're missing is that the Layout argument is expected to be a struct. Since Layout.Row is not a valid Matlab field na...

11 maanden ago | 1

| accepted

Answered
how do i change the dicom file's brightness and contrast with slider bar in app designer
You should use caxis instead. That way you can adjust brightness and contrast directly without having to redraw the image every ...

11 maanden ago | 0

Answered
How to make normal distribution curve from the bar chart?
Your data resolution is too low now that you have this bar chart. Unless you have the actual underlying data it is not possible ...

11 maanden ago | 0

Answered
From a structure with "n" fields which each are a vector, I want to make a vector of length "n" made of the 3rd value of each vector of my structure.
The last solution you mention would be my suggestion, except you don't need the (:). file = struct('dist',{[1 2 3];[4 5 6]}); ...

11 maanden ago | 0

Answered
How can I write duplicate files that are equal to or greater than 1GB to a excel file in Matlab?
You can use the unique function instead of your double loop (which could be improved by starting the second at (i+1) instead of ...

11 maanden ago | 1

| accepted

Answered
How can I use a for loop to interpolate to a certain number of points, and remove NaNs?
For the second part it is easy enough with a few cell vectors as an intermediate step (if you want to store the separate element...

11 maanden ago | 0

| accepted

Answered
Creating an inputted number of randomised arrays
Depending on what you want to do next, you can either create a cell vector in a loop, where each element is a matrix, or you can...

11 maanden ago | 1

| accepted

Answered
histcounts do not provide a reasonable output
With Matlab you generally don't have to be confused about functions. The documentation is one of the major advantages of Matlab ...

11 maanden ago | 0

| accepted

Answered
Changing line colors in nested for loop not working
Why are you using eval? There is no real reason you should need it. Same goes for length: what you actually mean is numel (or pe...

11 maanden ago | 0

Answered
Portable version of Matlab
Besides some trickery with a networked license, it is very likely against the license agreement to have a portable Matlab instal...

11 maanden ago | 0

Answered
How to access data of regexp output (without temporary variable)?
If you insist on a single line, you can even use subsref to index the result of regexp. That will make your code hard to read an...

11 maanden ago | 1

Answered
How to create a column vector corresponding to number of rows of matrices using for loop?
You should always load to a variable. Then it is a lot easier to see where your variables come from. For this case I expect you ...

11 maanden ago | 0

| accepted

Answered
How to generate randomly placed circles and assign them a function-defined value
Just a clarification: M is not a function here, but a variable. Otherwise your code as posted would not work. Putting this in a...

11 maanden ago | 0

| accepted

Answered
Using App Designer, saving (and loading) data from the Edit Fields of the GUI to a file?
Your loading function needs to load the file, and then set the values of the fields. It currently only does the former. A mat...

11 maanden ago | 0

| accepted

Answered
How to save a function handle to a .m file
I forgot the name of function, but a few years ago, a function was introduced to capture the output to the command window to a v...

11 maanden ago | 1

| accepted

Answered
App designer hide/show line graph on axes
And set(B, 'visible', 'off');?

11 maanden ago | 1

Answered
How do I repair the eror?
You need to make sure each element of the cell array is a char vector. Since currently the second one is a cell, you need to unp...

11 maanden ago | 0

Answered
How can I get a user to input a number which is not already
What you need to do, is to put your input statement at the start of the while loop, and then you can use ismember instead of a l...

11 maanden ago | 1

| accepted

Answered
Under Linux, how do I get a menu of figure windows so I can click to raise one window?
If using a code solution is fine, you can use this: % Create figures with names f1=figure; f1.Name = 'foo'; f2=figure; f2.N...

11 maanden ago | 0

| accepted

Load more