Respondida
How can I export text and numeric data from excel to uitable (GUI element)
According to the docs, when you set the Data property of a uitable created with the figure function, you must set it to a numeri...

alrededor de 4 años hace | 0

Respondida
cellfun vs. varfun applied to column of table
varfun passes entire variables from your table into your function. It calls your function once per table variable. The variable ...

alrededor de 4 años hace | 1

| aceptada

Respondida
rotate colorbar tick labels
You could place the labels yourself using text. Personally, I'd rather MATLAB figure out the placement. Here's code which puts ...

alrededor de 4 años hace | 0

Respondida
transform fprintf in disp
Maybe this? disp(sprintf('\nPara i= %d\n e a= %f e a resposta é: %f ', i, n, c)) You'll get a warning that fprintf is prefe...

alrededor de 4 años hace | 0

Respondida
Adding Legend to a multiple graph within a loop
The legend should show after you call legend(), i.e.: clear all close all clc hold on data=dlmread('data.txt') for i= 1:27...

alrededor de 4 años hace | 0

| aceptada

Respondida
assume(x^2 == y) doesn't work
From the docs, "assume is not additive. Instead, it automatically deletes all previous assumptions on the variables in conditio...

alrededor de 4 años hace | 0

Respondida
Histogram with adjusted bins to gaussian
If you'd like to fit a histogram to a normal distribution but you don't know the underlying data (e.g. you've altered the histog...

alrededor de 4 años hace | 0

Respondida
MATLAB drawrectangle ROI custom wait function difficulty
Store the figure in h so that when you later call close(h), MATLAB knows what h is: h = figure(1);

alrededor de 4 años hace | 0

| aceptada

Respondida
How to edit grid lines on a 3D plot
It seems to me that Dillen.A's answer from your link is pretty elegant. Adapting that code to work with 3D axes: f = figure; ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Matlab Sort Command Output
How about this? x1=3; x2=1; x3=2; a=[x1 x2 x3]; varNames = {'x1','x2','x3'}; [~, idx] = sort(a); fprintf('Output:\n%s\n',...

alrededor de 4 años hace | 1

Respondida
Compare elements from two matrix.
How about this? x = x1; idx = abs(x1) < abs(x2); x(idx) = x2(idx);

alrededor de 4 años hace | 0

| aceptada

Respondida
Subscript indices must either be real positive integers or logicals.
thetat=0:0.012566:0.6283; for idx = 1:numel(thetat) % use thetat(idx) to access the appropriate theta value in any iterati...

alrededor de 4 años hace | 0

| aceptada

Respondida
Value assignment to vector, without loop
Here's an option: N = 20; idx = (1:N)'; out = (idx >= frm & idx <= to)*value'; The indices in frm and to can't overlap, and ...

alrededor de 4 años hace | 1

| aceptada

Respondida
How do you display a users input into an questdlg command?
fprintf prints text to a file which corresponds to the supplied file ID or, if you don't supply a file ID, the command window (f...

alrededor de 4 años hace | 0

| aceptada

Respondida
How can i prevent the plots from appearing while still using them as frames for the movie function?
Plot your frames on a figure whose Visible property is set to 'off': fig = figure('Visible', 'off'); ax = axes(fig); x = lins...

alrededor de 4 años hace | 0

Respondida
Vectors must be the same length with plot of Shear Force Diagram
If you look in the workspace, you should see that X has length 200 while V has length 101. If you want to plot V over X, they ne...

alrededor de 4 años hace | 0

| aceptada

Respondida
subplot question - with image and plot
This is possible by setting the parent axes in your call to imshow: subplot(1,2,1); plot(rand(10,1)); ax = subplot(1,2,2); i...

alrededor de 4 años hace | 0

Respondida
Matlab 3 variable function plot
You can pick any interval. Your plot will only show something if solutions to f=0 lie within the interval. [0, 0, -b1/Beta(3)] i...

alrededor de 4 años hace | 1

Respondida
Error using plot !
z has length (44100 1/s) * (5 s) = 220500. t has length 220501. You could use linspace to ensure t has the correct length: t = ...

alrededor de 4 años hace | 0

Respondida
Display data in matrix with two different colour scales, depending on cell value
This first bit of code sets up a colormap with 2*N colors ranging from dark green to light green to light red to dark red: N = ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Change color to grey
colormap([0.86 0.86 0.86]) freqz2(abs(h,[32 32]));

alrededor de 4 años hace | 0

| aceptada

Respondida
To get 100 vectors using the previous vector
Better to not name the arrays Q1, Q2, Q3... Q = cell(100,1); Q{1} = Q1; for i = 2:numel(Q) Q{i} = F*Q{i-1}; end

alrededor de 4 años hace | 0

| aceptada

Respondida
Haunted Code (Serious)
That is the default image upside down. You can view it by calling just >> image When you call imshow(image); MATLAB first ev...

alrededor de 4 años hace | 2

| aceptada

Respondida
How can i plot surfaces for a recursive function?
Try this: for n = 0:5 ax = subplot(2,3,n+1); fsurf(ax, @(x,y) F(n,x,y), [-1 1]) end

alrededor de 4 años hace | 0

| aceptada

Respondida
Why does the signature of my method change at runtime?
You can either reference your function with @(block, event) app.updateSpeed(block) or @(block, event) updateSpeed(app, block)...

alrededor de 4 años hace | 0

| aceptada

Respondida
Matrix Indexig or how to access values of a matrix
You could convert to linear indices: solution = A(sub2ind(size(A),index(:,1),index(:,2)));

alrededor de 4 años hace | 0

| aceptada

Respondida
split a 2d matrix and create new 3d matrix from the results of the 2d matrix
I believe this should do what you want: Matrix_T_A = permute(repmat(T_A, 1, 1, 24), [3 2 1]); Using the for loop, T_A(i,:).*...

alrededor de 4 años hace | 0

| aceptada

Respondida
Plot surface from a stored handle (handle of a surface) in .mat file
How about this? set(sobf, 'Parent', gca) If you want to save the view, gridlines, ticks, anything else about the axes rather t...

alrededor de 4 años hace | 0

| aceptada

Respondida
Plot matrix values as colors in a checkerboard pattern
Why red? What if some real data is mapped to red? You are right about the -1 values messing things up. But the 0s on the border...

alrededor de 4 años hace | 0

| aceptada

Respondida
Problems with xaxis ticks and labels
The x axis limits are from 1 to 34, based on your box plot. When you call hold on and then plot a line from 0 to 35, the limits ...

alrededor de 4 años hace | 0

| aceptada

Cargar más