Answered
Two graphs in one plot with own RGB hex or decimal code
You'd have to plot them in two instructions to do that, e.g. plot( hAxes, x1, y1, 'color', [0 0.5 0] ); hold( hAxes, 'on...

8 years ago | 0

Answered
Finding Max and Min while ignoring a specific range
max( X( X < 0.01 ) ) min( X( X > -0.01 ) ) should work?

8 years ago | 0

Answered
Why do strfind and regexp may lead to a different result?
regexp( 'Infinitely Variable Transmission (IVT)', 'Infinitely Variable Transmission \(IVT\)' ) works, but you have to escap...

8 years ago | 0

| accepted

Answered
How to shift the vector element inside of the vector?
nShift = 2; a = circshift( [a zeros(1,nShift )], nShift ); a = a(1:end-nShift ) will work I guess

8 years ago | 2

Answered
Unwrapped phase of signal
Why are you bothering to unwrap the phase if you are just going to take the cosine of it? It will be exactly the same as for the...

8 years ago | 0

| accepted

Answered
How to create two "axes" plots in the same GUI?
You haven't shown any plotting code so I can only guess at what you are doing which is a bit silly if you are trying to get an a...

8 years ago | 0

| accepted

Answered
Insert 3D array into Another 3D Array
yMax - yMin will always be 1 smaller than yMin:yMax because of the inclusive end points (assuming integers, of cour...

8 years ago | 0

| accepted

Answered
disturbing axes while zooming in a plot
You are manually setting the tick labels. When you zoom these will no longer get auto updated so you will likely end up with a m...

8 years ago | 0

Answered
Object as a key in a map container
No. Keys are restricted to: 'Possible values are 'char', 'double', 'single', 'int32', 'uint32', 'int64', or 'uint64'.' So...

9 years ago | 0

| accepted

Answered
Showing Alert of empty axes box.
Declare e.g. handles.hImage = []; at the start of your program, then just set this when you plot the image as e.g. ...

9 years ago | 0

Answered
Replace the value of one column conditional on another column
A( A(:,2) == 1, 1 ) = [0.5; 0.8]; A( A(:,2) == 2, 1 ) = [0.4; 0.6; 0.8]; works, but it is very brittle. It relies on th...

9 years ago | 0

| accepted

Answered
axes title of all open figures
It can be done, but sometimes you have to ask yourself why you specifically want to avoid a for loop because the alternative can...

9 years ago | 0

| accepted

Answered
Combine of two matrices
AB = reshape( [A; B], [1 10] ) will give you what I guess you want. What you claim you want doesn't have any obvious logic...

9 years ago | 0

| accepted

Answered
Is there a way to return a variable name from the variable value?
No. Feeling the need to do this is also a sign that your code design has gone very wrong too. The variable name is just a hand...

9 years ago | 0

Answered
why i cant save files in my standalone app
doc mkdir takes arguments that allow you to specify the parent folder. Never just call it with the name of the folder you ...

9 years ago | 0

Answered
from two to three dimensional matrix
doc reshape

9 years ago | 0

| accepted

Answered
GUIDE - Callback triggered - How can I start function in callback safely without getting interrupted by same callback?
For a callback, the 'Interruptible' property of the component triggering the callback determines whether or not it can be interr...

9 years ago | 2

Answered
How can I pass variables (declare in a pop up menu) in a pushbotton section of GUI ?
I didn't notice this before. Maybe it is a typo in your question, but I will assume you just pasted in from your code: set...

9 years ago | 0

Answered
I have the following code .its showing " subscript indices must be either real positive integer or logicals".Plz anyone answer whr is d problem
5-n is 0 when n is 5 in your loop. 0 is not a positive integer.

9 years ago | 0

| accepted

Answered
Changing the values of multiple objects at once?
The default set function for properties works on scalar objects only, but you can write your own functions (and any other functi...

9 years ago | 0

Answered
How to return function handle from fit
I don't have the curve fitting toolbox, but objects come with a variety of functionality in terms of methods and properties. Ma...

9 years ago | 0

Answered
Update a toolbox (but not MATLAB)
No, all toolbox versions are uniquely linked to a base Matlab version so when you upgrade one you upgrade all.

9 years ago | 2

| accepted

Answered
Linking values in two matrices
A > 0 & B > 0 A == 0 & B == 0 Counting the results is trivial.

9 years ago | 0

Answered
Summing over the same category within one column
Something similar to this should work, although your matrix sizes don't correspond with your comments. You say you have a 3500*...

9 years ago | 1

| accepted

Answered
How do I disable the automatic line wrapping in the editor?
Do you mean comments? Code doesn't auto-wrap at all as far as I am aware There is another under Editor/Debugger -> Language...

9 years ago | 23

| accepted

Answered
Check if an element is in the range or not
a = [1 1 1 1]; b = [10 100 20 30]; c = [2 3 4 100]; isInHyperbox = all( c >= a & c =< b ); Obviously use < an...

9 years ago | 1

| accepted

Answered
Using a forloop to delete invalid trials in multiple variables/matrixes
idx = ismember( trialinfo(invalidboolean,1), invalidtrialstrialinfo ); saccinfo( idx ) = []; should work to delete them...

9 years ago | 0

Answered
How do I convert a script to a function?
There may be other things wrong, but these 2 lines are surely not what you want. You pass in p and v as input arguments, then y...

9 years ago | 0

| accepted

Answered
Display list of values using drop down list
doc uicontrol gives examples, including a 'popup' menu which is what you want.

9 years ago | 0

Answered
Plot multiple Surfaces to Axes in GUI?
doc surf There is a syntax for surf as: surf( ax,... ) which allows you to pass in an axes handle as the first argu...

9 years ago | 0

Load more