Réponse apportée
Display numerical output with sprintf?
text = sprintf('You completed %d key presses.', numPresses); Screen(window, 'DrawText', text, ceil(resX/2)-60, ceil(res...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
I am Not able To sort Out How to achieve This.
You could simplify your code I = rgb2gray(imread('peppers.png')); T = 'Hallo World'; I(1,1:length(T)) = uint8(T); ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Want image appear when click in axes?
Like this? imshow('peppers.png') axis on

plus de 11 ans il y a | 0

Réponse apportée
How can i make a 3D plot that is made of many 2-points line with a direction
quiver3 is the function that you need M = rand(100, 6); ind = 1:20:size(M, 1); quiver3(M(ind, 1), M(ind, 2), M(...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How can you transform a color x3uint8 image to uint8?
No, because for each pixel 2^(8+8+8) different colors are possible.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to divide an image 512x512 into 4x4 overlapping blocks.
If you do something for N times for M times you do it for N*M times, i.e. for (e-3)*(f-3) times in your example. No need to use ...

plus de 11 ans il y a | 1

Réponse apportée
How to create an array out of a matrix based on criteria.
b = a(1,:); c = []; for i = 2:size(a, 1) if ~isempty(intersect(a(i,:), b)) b = union(b, a(i,:)); else ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to use multiple outputs from function
Why not z = x + y;

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Two for loops, one loop completes for each step of another loop... Or a better way of doing finding the different combinations of elements in a vector that sum to target value
v1 = 100:100:1000; v2 = 100:100:1000; [V1 V2] = meshgrid(v1, v2); ind = find(abs(V1 + V2 - 1000) < 10); o1 = [.60 .61...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to plot a polynomial function multiplied by a row vector
for k = 0:M p = p + a(k+1)*x.^k; end;

plus de 11 ans il y a | 0

Réponse apportée
problems with the step size in a for loop
Allocate Q to be a vector of 10 NaNs (not a number) before doing the computations Q = nan(1,10);

plus de 11 ans il y a | 1

Réponse apportée
What kind of loop for this equation?
theta = 0:360; l = 300:800; [Theta, L] = meshgrid(theta, l); Z = cos(Theta/180*pi)./L; mesh(theta, l, Z)

plus de 11 ans il y a | 2

Réponse apportée
Matlab R 2014 a not workin on official Yosemite Update?!
http://www.mathworks.com/matlabcentral/answers/159003-why-am-i-unable-to-install-or-start-matlab-on-os-x-10-10-yosemite

plus de 11 ans il y a | 0

Réponse apportée
For-loop show an element which has format number different with others in an array?
This is because mwl is not exactly 300 but 300 + 5.6843e-014. Either use mwl = round([0:dwl:str2double(chieuchimd)]*100...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
how to check values in a cell is smaller than a certain number?
Because it's a 1 x 12 cell you can address the i'th cell using E{i} for i = 1:12 smallvalues = E{i}(E{i} < 15.5); ...

plus de 11 ans il y a | 1

Réponse apportée
about reading strings with strread using a name of variable the string is allocated to
Get rid of the extension '.fit' [pathstr name ext] = fileparts(A); starting_number = strread(name, 'capture_%03d');

plus de 11 ans il y a | 1

Réponse apportée
Finding average of iterated curves
Write a function "fullcode" that returns your curve, than you can use something like this for i = 1:N result(i,:) = fu...

plus de 11 ans il y a | 0

Réponse apportée
How to reshape a matrix from a vector?
If, e.g., 200 is the desired size, just use vec(200) = 0; All values between 105 and 200 will be filled with zeros.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Create matrix with randomly distributed integers, with exact relative abundances
values = [0:4]; mo = [0 0.5533 0.1346 0.1167 0.1954]; a = 100; b = 100; % create a vector where each value appear...

plus de 11 ans il y a | 0

Réponse apportée
xoring bits within a vector
Use space between the the 1's and 0's M = [1 0 1 1 0 1 1 1 0 0 1 1 ; 1 0 0 1 1 0 1 1 0 1 0 1 ; 0 1 1 1 1 0 0 1 1 0 0 1 ; 1 ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Need help with plotting a graph on matlab- linewidth
The help for plot states that "The X,Y pairs, or X,Y,S triples, can be followed by parameter/value pairs to specif...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Mesh plot with only every nth line plotted?
If you reduce the number of lines the plot will usually be less accurate, unless in special cases where you have, e.g., a plane....

plus de 11 ans il y a | 0

Réponse apportée
Hating this ->"Subscripted assignment dimension mismatch"
matrizcerostamaB(firstrow:firstrow+rowA-1,firstcolumn:firstcolumn+columnA-1)=imagenA;

plus de 11 ans il y a | 0

Réponse apportée
Getting a mean of only the numbers
Use nanmean

plus de 11 ans il y a | 1

Réponse apportée
Creating a heat map that would color different sectors of a circle
You can define a colormap with 30 entries with, e.g., cmap = jet(30); and then draw a filled circle segment with code fr...

plus de 11 ans il y a | 0

Réponse apportée
Horizontally join two datasets of different sizes based on a common field
C = [A B(A(:,4)+1, :)];

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
variable=variable+i written something like variable+=i?
You can us something like this so that you don't have to do the very long index computation twice ind = % very long computa...

plus de 11 ans il y a | 0

Réponse apportée
How to show two figures of dynamic plots next to each other?
Use drawnow, pause, and specify the axis as in the following example for i = 1:2 subplot(1,2,1) axis([0 20 0 20])...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Sum elements in matrix if equal to value in another element
To sum the elements for i=1:size(ovec, 2) r(i) = sum(ovec(find(ovec(2:end,i)==ovec(1,i))+1, i)); end To count t...

plus de 11 ans il y a | 0

Réponse apportée
i want to get a combination from a table of cell by fonction (combntns), but i dosen't work ,anyone can help me ,thank you
pairs = nchoosek(1:3,2)'; {C{pairs(:)}

plus de 11 ans il y a | 0

Charger plus