Answered
a simple vector to a matrix
X=[1 2 3]; I = eye(3); kron(X, I) kron(I, X)

4 years ago | 2

Answered
I want to make a function of x that uses loop for (x-x(i))
If the display isn't important: x = [1 2 4]; f1 = @(value) sum(cumprod(value-x)) f2 =@(x) (x-1) + (x-1)*(x-2) + (x-1)*(x-2)*(...

4 years ago | 0

Answered
I can't run fastaread and uigetfile over the runtime-based standalone app!!!!
filenameDB = [pathDB fileDB]; This line looks slightly suspicious. I'd prefer to use fullfile to assemble the fil...

4 years ago | 0

Answered
How can I form a table including a string and some other numbers in matlab?
If you want to create a table with one row and one of the variables is a row char vector, you could wrap that variable in a cell...

4 years ago | 0

| accepted

Answered
Where can I get the activation key?
If you are using your school or company's license, please contact your IT department (whoever maintains your software licenses) ...

4 years ago | 0

Answered
Execution of script ode45 as a function is not supported/Error in pop (line 9) [t,p] = ode45(@yprime,[0,tfin],pinit,options);
/Users/laurenashby/Documents/MATLAB/ode45.m This script file is preventing MATLAB from running the ode45 function included with...

4 years ago | 0

Answered
graph format for Applied Physics Letters Journal papers
There is a page with guidelines / rules for Applied Physics Letters manuscripts. If you have further questions about those guide...

4 years ago | 0

| accepted

Answered
Execution of script ode45 as a function is not supported ... Error in pop (line 12) [a,b] = ode45(@yprime,[0,tfin],pinit);
You've written a script file ode45.m that's taking precedence over the ode45 function included in MATLAB. Check where that scrip...

4 years ago | 1

Answered
Mathwork address is required. My apologies if its not Matlab question
I'm not certain what tax documents you need to send to MathWorks, but perhaps you should contact Customer Service using the Cont...

4 years ago | 1

Answered
How to create iteratively a vector of handle functions?
c = {@sin; @cos; @tan}; f1 = @(x) cellfun(@(fh) fh(x), c); % Assuming the outputs are all scalar y1 = f1(pi/4) f2 = @(x) cell...

4 years ago | 0

Answered
Saving a variable with an index in a for loop
Can you do this? Yes. Should you do this? The general consensus is no. See that Answers post for an explanation and alternative...

4 years ago | 0

Answered
License will still running if I change my laptop?
Use the instructions in this Answers post to deactivate the license on the old laptop then install and activate the license on t...

4 years ago | 0

Answered
Why indexing vs not indexing the 2D matrix will lead to different result?
For a long time [Bobby Cheng and Peter Perkins call out "a few release" and "several releases" in a thread from 2007 on the old ...

4 years ago | 2

| accepted

Answered
Hi, I have some code written to solve LU decomposition, but the code tells me that there is an error in [n, n], why is this error? Any suggestions?
When you're asking for help understanding the cause of an error message, please include the error message in your post. I'm goi...

4 years ago | 0

Answered
how to type this equation in matlab?
Much as you'd written it here, except for the fact that if you multiply a number and a variable, two variables, or a number or v...

4 years ago | 0

Answered
forming a function handles in matrix
MATLAB used to allow nonscalar arrays of function handles, but that functionality was removed probably 10 to 15 years ago. As th...

4 years ago | 0

Answered
Problem creating a cash register function
Every time through your while loop you overwrite the value of the change variable with the contents of the total variable. Neith...

5 years ago | 0

Answered
Array indices must be positive integers or logical values.
In the last line of your for loop: (Lambda_1(1-exp(-1*Lambda_0*t(i)))-Lambda_0(1-exp(-1*Lambda_1*t(i)))) It's very unlikely 1-...

5 years ago | 1

| accepted

Answered
Can histogram bin edges and width be specified for the same histogram?
The edges input is not required to be a uniformly spaced vector. x = rand(1, 1e5); E = [0 2.^(-5:0)]; h = histogram(x, E, 'No...

5 years ago | 0

| accepted

Answered
How to read a very large number, say of 700 digits?
Your 700 digit number is too large to fit in double precision. The largest finite double precision number doesn't have that many...

5 years ago | 0

Answered
How Do I compare classes without having an error
Either use isequal or (especially if class hierarchies are involved) use isa. x = 5; y = int8(3); z = 42; f = figure; isequ...

5 years ago | 0

Answered
Error loading files after compiling an app in AppDesigner
[file, path] = uigetfile('*.nii'); disp(['User selected ', fullfile(path, file)]); app.nifti = niftiread(file); You ask the u...

5 years ago | 0

Answered
solve a set of two linear equations
If this isn't a homework assignment, use fsolve from Optimization Toolbox. If this is a homework assignment, check your textboo...

5 years ago | 0

Answered
I want an old Matlab Webinar on GPS Receiver
Do you mean this book, published in 2007? A lot has changed in the past fourteen years: many (most?) of the products whose docum...

5 years ago | 0

Answered
how to remove error"Conversion to logical from sym is not possible."?
This doesn't do what you probably think it does or want it to do. p<= tol >=t This is the same as: (p<= tol) >=t which wou...

5 years ago | 0

| accepted

Answered
SelectionType of Mousebutton is empty
Likely your figHandle variable is empty. If you're looking to determine how the mouse button was pressed _in your app window_ wh...

5 years ago | 0

| accepted

Answered
A figure created in script "x" is being automatically deleted (didn't used to) when script "x" calls another script.
The GUI that deletes the figure probably calls close. You can protect the figure against closing somewhat by changing its Handle...

5 years ago | 0

Answered
Showing that Newtons method is quadratic convergent in Matlab
Before you implement this in code, how would you implement Newton's method (with error data collection, to assess convergence) i...

5 years ago | 0

Answered
Stop Bit growth for power computation
If you want to saturate one way you can do this is to use integer arithmetic. b = int32(-97) C = power(b, 28) Alternately you...

5 years ago | 1

Answered
i cannot find all x values from abs(x) using solve() function
Tell solve to show you the parameterized solution and the conditions that those parameters need to satisfy in order for the para...

5 years ago | 2

Load more