Beantwortet
How can I update initial value of an array in a for loop?
Use 3 separate variables, with a slight fix to the value assignment you suggested in the question. Also, throw a break inside t...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab renewal with new toolbox
You can ask them to match up the expiration dates. They'll prorate the toolbox.

fast 7 Jahre vor | 0

Beantwortet
problem using setdiff to check if a vector is present in a loop
I think all you need is the |'rows'| input to |setdiff|. Otherwise, |setdiff| includes an implicit |unique|, so any duplicate d...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
How to combine two different conditions for a user?
Personally, I would just round the input (and inform the user if you choose). Then, all you need is check the range. x2 = ...

fast 7 Jahre vor | 0

Beantwortet
Deploytool, which folder to distribute?
The _for_redistribution_ folder bundles your application with a web-downloading runtime installer. After running _MyAppInstalle...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Output argument not assigned during call
The output variable |x| is only set (assigned a value) *inside* the while loop. What happens if your test condition ( |f(r) - f...

fast 7 Jahre vor | 1

Beantwortet
problem executing while loop
Edit - Sorry, said that wrong. You aren't updating your checks inside the loop. The value of |numsum| is *always* the value ...

fast 7 Jahre vor | 0

Beantwortet
Entering Special Characters Such as Greek in Editor and Command Window?
According to the <https://www.mathworks.com/help/matlab/ref/sprintf.html?s_tid=srchtitle documentation> for |sprintf|, you can d...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Find average of multiples lines
Regarding the follow-up question found in the comments (NaN affecting the mean): Use the 'omitnan' flag of the |mean| functio...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Parallelizing Independent Tasks Help
Per the comments, I think you're having curly-brace vs. parenthesis problems, and 1:3 in input, not 1:4: input = { H, 1, ...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
complied standalone app failed to include toolbox functions
Use the |%#function| pragma to help the dependency checker find those str2func-type files. See <https://www.mathworks.com/hel...

fast 7 Jahre vor | 0

Beantwortet
how to vectorize .
You have already preallocated y2, y3, y4 with zeros. Use a row indexing variable to insert temp and stop re-inserting the zeros....

fast 7 Jahre vor | 0

Beantwortet
Plot, Hist functions cause crash / internal error
It's opengl('save','software'); % Straight from the documentation As the crash dump and Star Strider have told you, *cal...

fast 7 Jahre vor | 0

Beantwortet
why does windows command shell close?
The task is finished, so the process ends. Ending the process closes the command prompt. You can launch a Windows command pr...

fast 7 Jahre vor | 2

| akzeptiert

Frage


Creating a string scalar with line continuation
I'm passionately against breaking the 80'ish character width limit in code files. Therefore, I use line continuation ellipses h...

fast 7 Jahre vor | 2 Antworten | 0

2

Antworten

Beantwortet
sir,i am new to matlab . I received an error saying Index exceeds matrix dimensions..Here is the code for channelization.
|xx| is length N = P*L. Inside the loop, the maximum iteration index is k*L+Np = (p-1)*L+4*L = (p+3)*L. Since |p = ceil(P)|, (...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
How can I delete numeric Headings/Delimiters from a large text file
f = 'examplefile.txt'; fmt = ['%*f%*f%*f',repmat('%f%f%f%f',1,47)]; fid = fopen(f,'rt'); data = textscan(fid,fmt,Inf,...

fast 7 Jahre vor | 0

Beantwortet
Setting UI table size to start from the top row and have a scroll bar
Not sure why you're using HTML here... u = uitable(figfig,'Data',outHtml,'Units','normalized','OuterPosition',[0,0,1,1]); ...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
interpolation issues and errors in GUI
*Edit:* I must apologize. I said |setdiff| below and I meant |unique|. You've already found the |union| function. Scroll to ...

fast 7 Jahre vor | 0

Beantwortet
How to create ui menu with app designer?
<https://www.mathworks.com/help/matlab/release-notes.html?rntext=&startrelease=R2017b&endrelease=R2017b&category=App+Building&gr...

fast 7 Jahre vor | 1

Beantwortet
Issue Integrating figure, uicontrol, and callback function
Store |plt| in the listbox's _UserData_ property. uiCtrl = uicontrol('style','listbox','max',2,'min',0,'fontsize',6,'positi...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Effect of installing MATLAB in D drive
The installation location will have no impact on memory use. You can try increasing your virtual memory (pagefile in Windows) s...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Optimise/replace this for loop used in calculation of mutual information
Taking some guesses: eyeinds = eye(nObs,'logical'); dx2(eyeinds) = Inf; dy2(eyeinds) = Inf; dz2(eyeinds) = Inf; ...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Circular Listeners (2 objects listening to each other)
_Interesting, .mlapp files cannot be uploaded to MATLAB Answers..._ I have solved the problem myself, but I'm still open to b...

fast 7 Jahre vor | 0

| akzeptiert

Frage


Circular Listeners (2 objects listening to each other)
I have a data class and a GUIDE figure to help interact with the data. One of the properties of the class is a threshold value,...

fast 7 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Applying labels to specific data points
If you're already using |text|, just throw an index into the mix... Assuming you have: text(x,y,N); Change it to: ...

fast 7 Jahre vor | 2

| akzeptiert

Beantwortet
Loading multiple mat files with the same name from folder source
The (relatively) new recursive |dir| is amazing. mats = dir('N:\Gait\Research\Current Projects\CP Hemi Synergy Analysis\Dat...

fast 7 Jahre vor | 0

Beantwortet
why does the integral of sin(x) from -pi to 0 in matlab 2017b gives 0 instead of -2?
I would definitely submit this to tech support. I don't even need to recall my rusty calculus to know that the results should m...

fast 7 Jahre vor | 0

Beantwortet
how to get a special view of a plot in MATLAB
Turn on rotation, right click the plot, then choose _Go to X-Z view._ <</matlabcentral/answers/uploaded_files/101099/Untitled...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
How Are Calculations Done for Variable That's Inclusive of Itself?
You won't gain anything with temp = x; x = temp + 1; over x = x + 1; If you have a lot of loops and the code ...

fast 7 Jahre vor | 0

Mehr laden