Answered
how do I change the position where a gabor patch is displayed (Psychtoolbox)?
According to the documentation: http://psychtoolbox.org/docs/Screen-DrawTextures you can specify the location(s) to draw to as...

3 years ago | 0

Answered
How to collect and show answers captured by using key press function (keypressfnc)?
The main problem here is that the KeyPressFcn is executed every time the user hits a key while the figure has focus. That is, Ke...

3 years ago | 0

| accepted

Answered
How can I mark the vertex of a hexahedron with dots?
Use the 'Marker' (and possibly 'MarkerSize', 'MarkerFaceColor', 'MarkerEdgeColor') properties. <https://www.mathworks.com/hel...

3 years ago | 0

| accepted

Answered
I need help with this app designer code
Do you mean to use im2gray?

3 years ago | 0

Answered
General indexing into structure
One way to do that is: structure.field2(strcmp(structure.field1,'string')) because you want to index into field2, not index in...

3 years ago | 0

| accepted

Answered
How do i make matlab diferentiate words in cell array
C = {'12100213.csv' '12100214.csv' '12100215.csv' '12100216.csv' '12113013.txt' '12120423.txt' '12120516.txt'}; [~,~,ext] = f...

3 years ago | 0

| accepted

Answered
Split numbers in a cell into a few columns in V2011
You can try str2num: str = ' 2 5 0.866000 2 1'; val = str2num(str)

3 years ago | 0

| accepted

Answered
for loop 2x2 matrix, do not overwrite each iteration
Depends on what you want the 10x2 matrix to be, but maybe this: a = zeros(10,2); for i = 1:5 a(2*i-[1 0],:) = [i i+1;i i-...

3 years ago | 0

| accepted

Answered
How to define a criteria for output arguments of a function?
One way: function [d,e] = operation(a,b,c,option) if option == 1 d = a+b; e = b+c; end if option == 2 d =...

3 years ago | 0

| accepted

Answered
plot a function wit cos
Maybe this y=0.094*cos*(((100*pi)/3)*z); should be this y=0.094*cos(((100*pi)/3)*z); or, without the extra parentheses: y=0...

3 years ago | 0

Answered
Function RunButtonPushed(app, event) nothing happens when button is pushed.
function RunButtonPushed(app, event) % ScriptPath = pwd; % Find current path to script as sta...

3 years ago | 1

| accepted

Answered
Trying to add labels to a contour map of a given function
X1 = 1:10; X2 = 5:20; F = X1.^2 + X1.*X2(:) - X2(:).^2; contour(X1,X2,F,'ShowText','on') xlabel('X1') ylabel('X2')

3 years ago | 0

Answered
How to delete the setting uimenu from the app.contextmenu component
"I need a answer to clear all children in app.ContextMenu." delete(app.ContextMenu.Children)

3 years ago | 1

Answered
How to change the color and the fontsize in the subplots of correlation matrix by corrplot function?
% use the third output (lines and histogram objects) from corrplot: [~,~,h] = corrplot(randn(4,4)) % get the parent axes of ea...

3 years ago | 1

| accepted

Answered
deleting multiple rows in a matrix
A([1:110 end-69:end],:) = []; (Also, note that 430:500 is 71 elements, not 70.)

3 years ago | 0

| accepted

Answered
Cases duplicated on menu Matlab
You need an "end" after "case 4, break" and before "case 2, break", to close out the "switch b1" block. And then you will need t...

3 years ago | 1

| accepted

Answered
Stack Bar Plot: length error between x and y
Try this: x = Book1.PickupTime; y = [Book1.Manhattan Book1.LaGuardia Book1.JFK]; bar(x, y, 'stacked')

3 years ago | 1

| accepted

Answered
How do I retain quotation marks around a file path when using it in another string?
localStorage = 'D:\myFilepath' localCSV = fullfile(localStorage, 'myFile.csv'); sprintf(":MMEM:STOR:TRAC:DATA TRACE1, ""%s...

3 years ago | 0

| accepted

Answered
Error: Execution of script input as a function is not supported
You have a script called input.m (located in /Users/air/Documents/MATLAB/). Rename it something else.

3 years ago | 2

| accepted

Answered
Help filtering a table from a dropdown in App designer.
Attached is an m-file you can run that creates a table of data and a popupmenu to change what's shown in the table. Try to adap...

3 years ago | 0

Answered
In contourf(), Force a matrix to begin at a specified value on the Y axis
load DataForMatlab % specify x and y in contourf, increasing y by 8 [m,n] = size(MIcf4); contourf(1:n,8+(1:m),MIcf4)

3 years ago | 0

| accepted

Answered
How can I take valid data points only and plot them?
Have you tried plot(serial_dates(valid_ararat),speed_ararat(valid_ararat)) ?

3 years ago | 0

Answered
Why i am getting an empty plot?
You get an empty plot because you are plotting one point at a time (g and i are scalars). A line with one point doesn't show up ...

3 years ago | 1

| accepted

Answered
How to add error bars to multiple axes-plots?
One problem is that setting XLimMode to 'manual' can have the effect of changing the XLim. Example: % create a figure, axes, a...

3 years ago | 1

| accepted

Answered
Change the size and position on the screen of interative menu
menu does not support setting the position of the window. Here is a modified version, my_menu (attached), which does. (It's base...

3 years ago | 0

| accepted

Answered
create grid in polar coordinates
After constructing your x- and y-coordinates with meshgrid, you can use cart2pol to convert them to polar coordinates. x = 0:50...

3 years ago | 2

Answered
It is necessary to sum the functional sequence F(t) by 'n', while at each step of summation it is necessary to take 'n' from another array n(t).
Redefine the function f_calc to take nD as its second argument. (You could also make nD a global variable.) See below: %% initi...

3 years ago | 1

Answered
how to plot multiple graphs with same x-axis and y-axis?
You can try something along these lines: % create a tiledlayout for 3 plots, with no space between: N_plots = 3; t = tiledlay...

3 years ago | 0

Answered
When I press ok button it automatically goes to command window.
Control switches to the command line because of your use of the input function here: money=money+input(ve); If you use inputdl...

3 years ago | 0

| accepted

Answered
Changing the amplitude of a chirp signal
The documentation for chirp explains how to set the parameters of a chirp signal: https://www.mathworks.com/help/signal/ref/chi...

3 years ago | 0

Load more