Réponse apportée
I'm trying to set the first for loop (M) to run for the values I have but I can't figure out how to get it run for the following values and not just the first.
Eduardo - try the following for m = M % Number of walks being calculated for in loop figure; for j = 1:m fo...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
LU Decomp in a For loop
Layla - since your b* are really just the x*, you probably only need one 2D array for x that will store the results for each ite...

presque 6 ans il y a | 1

Réponse apportée
My figure wont display a line
Hasan - look closely at your calls to plot plot(time_array(1:2),2,'-ob') The first input is an array of two elements but the s...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
I am new to Maltlab, i wanted to use a while loop to calculate pi using Montecarlo method. the code below is not giving me any answer can anyone help please.
Lilay - part of the problem is that estimatepi is set to an empty array. This variable is next used in the calculation of error ...

presque 6 ans il y a | 2

| A accepté

Réponse apportée
help with block letter
I think that part of the problem with the x positions in that there are too many that are the identical. If we look at the desir...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
I need help adding a title to a Wordcloud
Brian - you have the title already from your storyList and indx variables...so just re-use those just after you add the word clo...

presque 6 ans il y a | 0

Réponse apportée
Convert .csv to .wav audio
Debagnik - the y variable represents the audio samples. In your case, that would be output. Just change your code to the followi...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How do I create a 6 by 5 matrix, B, that contains random numbers between 0 and 10?
Cathy - see randi if you are interested in generating integers.

presque 6 ans il y a | 0

Réponse apportée
how to plot animated 2D figure using time axis and function in gui matlab ?
Mostafa - perhaps the following can be adapted for your needs x = linspace(-2*pi,2*pi,1000); y = sin(x); figure; hPlot = plo...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Hello my project showing Following errors please somebody help me with that
Navgire - the line of code axes(handles.axes1); seems reasonable and so the error message Dot indexing is not supported for v...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Finding area of a plot/graph in a for loop and save answer into array
whalelady - you mention that you are running into errors with data,fs] = audioread(Extracted_files(k).name); but you don't me...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
How to set specific values that correspond to a shape in a contour equal to NaN in a matrix?
Conor - I wonder if you could use inpolygon like ptsInPolygon = inpolygon(A,B,Aa,Ba);% Cp(ptsInPolygon) = NaN; figure(1) con...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Calculating orbital speed using input and loops, wondering if how I can make this work? Thanks for the help!
Anders - I think you almost have all that you need, though I don't think that you need to use loops...unless you expect the user...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Guessing game help (beginner programmer)
Reila01 - this sounds like this guessing game could be homework. I think that you have the correct pieces of the code, just not ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
says unused value , consider it by replacing it by~, how do I fix it ?
Abhisekh - the message is just a warning so could be ignored. All it is telling you to do is to replace the U and A with ~ like ...

presque 6 ans il y a | 0

Réponse apportée
Saving multiple .txt files into one .txt file
Austin - you may want to show the code that you had to combine the three files and we can perhaps discuss why it didn't work. El...

presque 6 ans il y a | 0

Réponse apportée
Repeat same plot with different ylimit
Ferdinando - if you create a cell array of all of the different y-axis limits, then you could just iterate over that array, crea...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
i keep getting Array indices must be positive integers or logical values.
Jithin - from x = linspace(-3,5,100) x is an array of negative and positives real numbers in the interval [-3,5]...so only a h...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
help extracting numbers from table of mixed strings
Molly - there must be an easier/better way to do this, but here is something that works: table = {'|137> Nuclei = all Fe {aiso...

presque 6 ans il y a | 0

Réponse apportée
For- loop to plot multiple images on a figure
The original error was concerned with img_lon(i) = [img_lowlon(i),img_uplon(i)]; img_lat(i) = [img_lowlat(i),img_uplat(i)]; w...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Error: Function definition not supported in this context. Create functions in code file.
Chew - in the above code, you are defining three functions (for each, there is the function signature and function body). These ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Is there any way to set which browser will open a link within the Matlab program?
mark - could you use system to launch a browser for the given URL? For example, on my Mac I can do either system('open -a Safar...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Removing nan values inside cells of a cell array
Jaskabara - you can use isnan to determine which elements are NaN in your array. This function returns a logical array containin...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Code is stuck in infinite loop
haif - part of the problem (of why you are getting stuck in an infinite loop) is due to dx=0.1; epsi=0.01; Xi=0.1; % <---...

presque 6 ans il y a | 1

Réponse apportée
Why do my loops only run once
Raquel - the MATLAB debugger is helpful in cases like this. If you put a breakpoint in your simpson13 you would notice a problem...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Show image based on radio button selecetion with push button
Yunus - when you are comparing strings, you need to use strcmp or strcmpi (else you will get the error you describe above since ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
clearing all empty cells for minesweeper (game) code
The original answer can be found at https://www.mathworks.com/matlabcentral/answers/118873-clearing-all-empty-cells-for-mineswee...

presque 6 ans il y a | 0

Réponse apportée
MATLAB HANGMAN HELP plz
Benjamin - I don't understand this code letters = ['a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' ...

presque 6 ans il y a | 0

Réponse apportée
Togglebuttons need to be pressed multiple times?
Luke - consider using callbacks for your toggle buttons (can these be push buttons instead?). That way, you can remove the waitf...

presque 6 ans il y a | 0

Réponse apportée
Write a function called draw_constellations that takes no input arguments and returns no output arguments. Instead, it obtains its input via the function ginput.
muhammad - every time that you call plot, you create a new graphics object and the previous one will be removed from the axes. Y...

presque 6 ans il y a | 0

Charger plus