Answered
x finds y using newtons method
This is your homework. We can expect, that you have learned the details of the Newton method in the lessons, or you can find the...

9 years ago | 0

Answered
How to save a struct member into a matrix?
You need a cell matrix to store the strings of different lengths: FileList = dir(fullfile(Folder, '*.*')); nFile = nu...

9 years ago | 0

| accepted

Answered
Matching based on the first word
A_list = {'Biotech Capital Corp', 'Apple something', 'tesla something else'}; B_list = {'Volvo Car AB', 'BIOTECH CAP CORP',...

9 years ago | 0

| accepted

Answered
How can I please reduce the code running time?
After A=char(A_cell{1,1}{:,:}); |A| is a CHAR. Then it cannot contain NaNs, because this can happen for DOUBLE and SING...

9 years ago | 0

Answered
How do I plot a sphere using the cylinder function?
x = linspace(0, 1, 20); [X, Y, Z] = cylinder(sqrt(x .* (1 - x))); surf(X, Y, Z); axis equal The first input determ...

9 years ago | 1

| accepted

Answered
How many consecutive ones?
I'd start at the end of the vector and store the value. Then run a loop from length(a)-1 to 1. If the corresponding element is 0...

9 years ago | 2

Answered
Problem with too many inputs into bvp5c
You should not use additional inputs at all, even some integrators still support this ancient method. See <http://www.mathworks....

9 years ago | 0

| accepted

Answered
Searching using loop in matlab
Perhaps you mean this: for i1 = 1:10 for i2 = 1:10 if i1 ~= i2 check collision between the particle i...

9 years ago | 0

Answered
Intersection of two planes.
Do you want to solve this symbolically? It is easy to do it numerically (or with pencil and paper): Start with converting the p...

9 years ago | 0

Answered
Updating listbox when deleting items
The error message occurs, if the Value is not inside the range |[1:numel(handles.exp_names)]|. If you delete the last string fro...

9 years ago | 0

| accepted

Answered
How can I rectify this: Error: Function definitions are not permitted in this context.
It is a good idea to search in the forum before asking. You would find the solution fast: In older Matlab versions, functions ca...

9 years ago | 0

Answered
How to use 'find' command for irregular spaced coordinates on a line.
This is not the job of |find|. What about functions from the FileExchange: * <https://www.mathworks.com/matlabcentral/file...

9 years ago | 0

Answered
How can I save a counter after push button in GUI ?
Usually the 3rd argument of callbacks created by GUIDE is "handles". Then: function pushbutton_callback(src,event,handles) ...

9 years ago | 0

| accepted

Answered
How to multiply 3*3 matrix to RGB values in and image
RGB1 = rand(100, 100, 3); RGB2 = rand(100, 100, 3); RGBa = cat(3, 0.299 * RGB1(:, :, 1) + 0.587 * RGB1(:, :, 2) + 0.144 ...

9 years ago | 0

| accepted

Answered
How to show an ordered polynomial independently of the value of the coefficients? guide
x = [50 20 60 1000 2000 400]; n = length(x); fprintf('%gx^%d + ', [x(1:n-1); n-1:-1:1]); fprintf('%g\n', x(n));

9 years ago | 0

Answered
Finding Middlemost row in a matrix
Perhaps - a bold guess: meanValue = (min(A(:, 1:2)) + max(A(:, 1:2))) / 2; dist = sum((A(:, 1:2) - meanValue).^2, 2...

9 years ago | 1

| accepted

Answered
Multiplication between 2 matrix
Or perhaps: C = [a, b; ... 2*a + 3*c, 2*b + 3*d];

9 years ago | 0

Answered
I have a problem
It is asked for "signed integer". Then uint32 is not an option, because it is unsigned. x = 'NONE'; % requires quotes ...

9 years ago | 0

| accepted

Answered
How to change surf function axis values to not use array index?
As explained in the documentation <https://www.mathworks.com/help/matlab/ref/surf.html#inputarg_X doc surf> : [X,Y] = meshg...

9 years ago | 2

| accepted

Answered
GUI table values to textfile - Cannot find a solution
Avoid "fclose(all)" but close the specific file directly by |fclose(a)|. "if filename < 0" is not meaningful here. What is ...

9 years ago | 0

Answered
Will only one gui come out or all? .exe
"GUIDE" is the tool to create dialogs. You do not have several "GUIDES", but figures. You have to include all figures and their ...

9 years ago | 0

| accepted

Answered
how to change the outline color of the guide window?
If you mean the border of the window: This is controlled by the operating system. You can change the color of *all* windows only...

9 years ago | 0

Answered
how to save values from'if' loop?
What about: A_T = cumsum(strcmp(alt{idx1}, 'T')) instead of the loops? Or perhaps you want: A_T = sum(strcmp(alt{id...

9 years ago | 0

Answered
what version of matlab is needed to read python
Every version does it using the |system| command, if Python is installed. If you have a specific problem or need a certain detai...

9 years ago | 0

Answered
how to count the count of indexes, 'A_T' value?
The code is unclear: You use "alt_n = alt{1}" in each iteration of the first loop and the same "ref" also. Perhaps you mean: ...

9 years ago | 0

Answered
Any good documentation on programming a GUI without GUIDE or App Designer?
See these excellent examples from Matt: <https://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-examples>...

9 years ago | 1

Answered
When i Run following program coding. I got these two errors : Error in water/execute (line 54) x1=kp4(@func, t, x1, u1, h); Error in water (line 4) execute;..Please anybody can help?
There can be only *one* error: Matlab stops after the first (uncaught) error. The multiple lines you see in the error message ar...

9 years ago | 0

Answered
How to acces value from previous time-step in ODE45 to be used in the current timestep?
I don't want to use the ode45 function more than once This is a very bad idea. The posted diagram looks like the function to...

9 years ago | 1

Answered
About "Compiler error"..
The instructions are clear: Please install one of the supported compilers for this release as listed at: http://www.mathwo...

9 years ago | 0

Answered
Is it possible to concatenate structures with the same fields in to one super structure?
Or with a loop: function S = CatStructFields(S, T, dim) fields = fieldnames(S); for k = 1:numel(fields) aField = field...

9 years ago | 9

| accepted

Load more