Réponse apportée
Matrix must be square
Did you mean to take the element-by-element power of the arrays? Look at the difference: x = magic(2) % A 2-by-2 matri...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
how to solve such transcendental equation?
There are several ways to go about this. One is to use FZERO. Since you didn't actually give the values for the constants, I'l...

presque 14 ans il y a | 1

Réponse apportée
how can find angle for symbolic function
The angle is just: ANG = atan(imag(r2s)/real(r2s));

presque 14 ans il y a | 1

Réponse apportée
Index exceeds matrix dimensions
I think you mean this: F = randi(100,3840,15); % Random 3840-by-15 H = randi(100,96,15); % Random 96-by-15; J =...

presque 14 ans il y a | 1

Réponse apportée
Form a matrix from elements of a second matrix
Your question is a little unclear, but I think you can get what you want with logical indexing. idx = Diameter<6; % ...

presque 14 ans il y a | 0

Réponse apportée
Extract a portion of vector
Say this is your vector: A = [3 4;5 6;8 7;9 8;7 5;5 3;3 9;12 4]; And you want all rows from 5 to the end to be nan: ...

presque 14 ans il y a | 1

Réponse apportée
how can i show a numerical output in gui
Give this a try: function guitrial S.voltageH = uicontrol('Style', 'PushButton',... 'Str...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to plot several different points from an equation? (Macaulay's notation)
function [ V ] = Untitled2(x) V = zeros(size(x)); V(x<=.76) = 632.568; V(x>.76 & x<=.99) = -2090.455; Now, from ...

presque 14 ans il y a | 1

Réponse apportée
How to tag output of function which is a vector in a new array/matrix in increasing order?
A{1} = [ 4 3 8 27 10]; A{2} = [4 3 8 27 10]; % etc... Then later you can examine them: A{2} . . ...

presque 14 ans il y a | 1

Réponse apportée
plot vectors from a point to another point
cla quiver(2,3,5,5,0) % Set scale to zero axis tight As I told you in <http://www.mathworks.com/matlabcentral/answer...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
plot vectors head to tail
I show you two methods. Both have their uses, so I'll let you decide which fits your needs: % Make a vector from (2,3) t...

presque 14 ans il y a | 4

| A accepté

Réponse apportée
initialize a MxN matrix with the same number
Another: % Make a 3-by-8 matrix of 9s: A(1:3,1:8) = 9

presque 14 ans il y a | 17

Réponse apportée
How to "accept" an answer to your question?
Make sure you are logged in. If the question has already been closed you will see "Accepted Answer by ______" to the right of y...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Write program by For loop, how can I stop
A=[40 47 50 60 70 75 80 80 90 55]; B(1)=70; C(1)=60; for k=1:9; C(k+1)= B(k)+C(k)-A(k); if C(k+1)<0,bre...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How can I call "UNIQUE" function in a MEX file?
Read this document, it describes how to call a MATLAB function from a mex file. doc mexCallMATLAB

presque 14 ans il y a | 2

Réponse apportée
How to evaluate calback function in edit text uicontrol?
Please do not program callback using strings. Use function handles instead. Save this in an M-file then run the file to see ho...

presque 14 ans il y a | 3

| A accepté

Réponse apportée
Keeping plot legend in foreground
I cannot reproduce this with: plot(1:10) legend('plot') line([5 5],[0 10]) So I want to ask what your code looks l...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
evalAt() does not work any way I use it
What do you see when you type these? Do you see the help, or do you see function not found? help evalAt help subs ...

presque 14 ans il y a | 0

Réponse apportée
Fibonacci function displaying issues
If you choose to use recursion, you will have quite some time with this. I think it is better to use iteration, myself. fu...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Error: Function definitions are not permitted in this context. ???
Where did you put that code? You cannot define a function at the command line or in a script M-file.

presque 14 ans il y a | 0

Réponse apportée
Why am I getting the "Index exceeds matrix dimensions" error when trying to perform triple integral of a function as indicated below? Thanks
You forgot one dot: h=@(x,y,z) cos(x)./sqrt((y.^2.)+(z.^2.)-2.*y.*z.*cos(x));

presque 14 ans il y a | 0

Réponse apportée
SLICE: Hiding the edges of slice
I am not sure if this is what you have in mind: set(h,'edgecolor','none')

presque 14 ans il y a | 0

| A accepté

Réponse apportée
I need to plot 8 bit long 256 data in two dimension axis
I have no idea how your data is structured. So I will leave that to you and just show how to label the axes. x = 1:10; ...

presque 14 ans il y a | 0

Réponse apportée
Trigonometri Problems at atand and acosd
This is perfect for the FZERO function.... fzero(@(z) 54.8-acosd(20./(100-z))+atand(40./(500-z)),30)

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Probabilty occurence of a number in long number sequence
X = randi(256,1,300)-1; % Data on [0 255] P = histc(X,0:255)/length(X); % Probabilities. [(0:255).' P(:)] % Show ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How can i do this?
One thing I notice in your code. It looks, by the way you index inside the FOR loop, like your image is 3D. If so, the variabl...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Need to map values to 0:1 scale for efficiencies..... Help?!
Why not use: semilogy to plot the efficiencies if they vary by orders of magnitude?

presque 14 ans il y a | 0

Réponse apportée
ismember function too slow
BinA = B(ismember(B,A)); for n=1:length(BinA) do-something with BinA(n) end

presque 14 ans il y a | 1

Réponse apportée
how to craete a matrix with desired elements
Many ways! What do you have in mind exactly? In the most general form: function A = makematrix() % Help user...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to find the median from each of the column with certain condition
Note that using FIND is not necessary.... x = randn(10,10); indices = abs(x)>2; % This is a logical index. x(indic...

presque 14 ans il y a | 0

Charger plus