Beantwortet
How to upcast an object?
You would have to implement your own <https://uk.mathworks.com/help/matlab/matlab_oop/concatenating-objects-of-different-classes...

fast 9 Jahre vor | 0

Beantwortet
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...

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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

fast 9 Jahre vor | 2

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 9 Jahre vor | 0

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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. ...

fast 9 Jahre vor | 0

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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 ...

etwa 9 Jahre vor | 0

Beantwortet
from two to three dimensional matrix
doc reshape

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 2

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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.

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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.

etwa 9 Jahre vor | 2

| akzeptiert

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

etwa 9 Jahre vor | 0

Beantwortet
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*...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 23

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

Beantwortet
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...

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

Mehr laden