回答済み
comparing two columns of a table in MATLAB
Annick - how about you remove the loop and just do Comparison = Table1.Interval1 == Table1.ActivityCode1; Wouldn't Comparison ...

10日 前 | 0

| 採用済み

回答済み
How to stock a vector in a vector
Maxime - try doing X = zeros(3,1000); for i=1:3 X(i,:) = -(log10(1-R)./water_u(i)); end where we use the : to indicate ...

10日 前 | 0

| 採用済み

回答済み
How do I go about increasing the number of arguments in my code? Or how should I fix this issue?
Mitch - there are a couple of errors around this block of code x = linspace(1:n_elem:30); O(x) = O_int+(x-1)*O_inc; X_1(x) = ...

12日 前 | 0

回答済み
Hello everyone! this is the first time I am using GA and I encountered with this message:Failure in initial user-supplied fitness function evaluation. GA cannot continue.
amir - you don't need to supply the f, those f values that have been attained in another code. The genetic algorithm will provid...

12日 前 | 0

| 採用済み

回答済み
Why this for loop is not working?
Amit - a is a row array but the code in the loop is treating it like a column array. Try changing the code to for i = 1:5 ...

13日 前 | 0

| 採用済み

回答済み
error when substituting value
Hao - your code above code is creating an array (this is your f) and not a table. So when you say something like x = 3; f(x) =...

13日 前 | 0

回答済み
Error in if condition
Ararat - don't use the elseif and just use two if statements (since you want to apply a specific action to both variables) if a...

13日 前 | 0

| 採用済み

回答済み
different answers thank you
I formatted your code so it might be a little more clear what is going on. Here is the while loop code while Y1 < 30 cot =...

14日 前 | 0

回答済み
Arduino ... a lamp
duaa - not quite sure what the error message is but I suspect it has to do with your second condition in while(k1 || (K1 == 0))...

14日 前 | 1

| 採用済み

回答済み
I need help with grade calculator! thank you!!
bushra - it isn't clear what handles.out19 is or how it is set, one problem is with if (handles.out19 >70 && <=100) and all th...

18日 前 | 0

| 採用済み

回答済み
Image rendering in GUI
Miroslav - rather than creating a new image (position) for the car on each iteration of the loop, try updating the YData (vertic...

18日 前 | 1

| 採用済み

回答済み
Why doesn't Matlab know the variable from appdesigner despite it is globalized into matlab workspace ?
farzad - rather than using a global variable, can't you just use pwd to identify the current working directory? So the code in y...

18日 前 | 1

| 採用済み

回答済み
Moving a square horizontally
Alexander - if you save the handles to the graphics objects that correspond to the square and the centre of the square, then you...

19日 前 | 0

| 採用済み

回答済み
please help me to translate wavread to audioread
David - from audioread, you could do (assuming that location is the name of (and path to) the audio file [x1,fs] = audioread(lo...

19日 前 | 1

回答済み
Bisection method (figuring out theta)
Ahmed - theta is your xmid and I think that you are calculating it correctly (see https://en.wikipedia.org/wiki/Bisection_method...

20日 前 | 0

回答済み
How to set timer queue to zero
Florian - I'm not sure if you can set the queue size to be zero (the documenation doesn't suggest that this is possible). An alt...

24日 前 | 1

| 採用済み

回答済み
check for keyboard press in while loop
raheem - since you have a figure, you could use the WindowKeyPressFcn to listen for a key press event (assuming that the figure ...

25日 前 | 0

回答済み
menu and vector equal
matt - you don't mention what is wrong with your code or if you have tried to fix the obvious bugs with it. Do you really mean t...

30日 前 | 0

回答済み
Index exceeds the number of array elements (0).
Ryan - if line 40 is T4=RobotConv(0, L(k), 0, 0); then the error message must be because of the index k into array L. Since a...

30日 前 | 0

| 採用済み

回答済み
Making a GUI for playback of wav files
Marius - you seem to be programmatically creating your GUI and throwing in GUIDE-style callbacks. You need to assign the callbac...

約1ヶ月 前 | 0

| 採用済み

回答済み
How to use uigetfile with filter set to "All files"..
Ahmed - if I use the following line of code uigetfile('*.*'); then "All Files" appears in the file browser window (I'm using a...

約1ヶ月 前 | 0

| 採用済み

回答済み
Taylor series for arctan
Abdullah - there are two parts to the code that you have shown. The code for the function and the sample code that can be used t...

約1ヶ月 前 | 0

回答済み
plotting at gui axes
Osama - I guess that the majority of your code to plot the results is in the raafawcaa06 function and I suspect that, like your ...

約1ヶ月 前 | 0

| 採用済み

回答済み
MEX - 'Initialization From Incompatible Pointer Type' Warning
Rowan - rather than using a bool perhaps you could try to use a mxLogical instead? Something like plhs[0] = mxCreateLogicalMatr...

約1ヶ月 前 | 1

| 採用済み

回答済み
GUI handles reference to non-existent field 'timer'
While your code in the Boid_GUI_OpeningFcn function is adding the timer to the handles structure, you are only modifying the "lo...

約1ヶ月 前 | 0

| 採用済み

回答済み
Flip stars pattern using recursive function HELP
Daniel - your code to print spaces (I think) for i=1:x fprintf('') end is not actually printing anything si...

約1ヶ月 前 | 0

回答済み
Create subsets by a moving window.
Anna - assuming that the data from your seismic catalog is in the myData matrix, then you could do the following fileCount = 1;...

約1ヶ月 前 | 0

| 採用済み

回答済み
How do I correlate two matrices together
Nathen - if we assume that the matrices are of the same dimension (which they will be for this game) then you can use the positi...

約1ヶ月 前 | 0

| 採用済み

回答済み
How to use min and max function in mex
A - The error message is telling you what is wrong expected 'double' but argument is of type 'double *'extern double __cdecl fm...

約2ヶ月 前 | 0

回答済み
How to load .txt files into MATLAB from server?
Austin - what is the error that you are observing? Is it Error using cell Size inputs must be scalar. Note the code numfiles...

約2ヶ月 前 | 0

Load more