Answered
App designer: retro compatibility 2017b vs 2015b
The AppDesigner was introduced in in R2016a. This means, that it is not compatible with 2015b. See <https://www.mathworks.com...

9 years ago | 1

| accepted

Answered
Adding the elements of a field of a struct
The error message is clear: The contents of the fields |output(:).distanceininches| have different number of rows, such that the...

9 years ago | 0

| accepted

Answered
Limited no. of points in a slider?
Why do you assume to get the value of 50999.95 when you press the arrow? The steps are the *fractions* of the available range, n...

9 years ago | 0

| accepted

Answered
How to get data only for specific country?
At first you need a data set for the borders of India. A short web search reveals e.g. * <http://www.naturalearthdata.com/> ...

9 years ago | 0

Answered
Parallel matrix operations on GPU using arrayfun, how to accelerate for big matrix?
I've played with the code. Inlining the contents of dst1 into dst2 or inlining both function into bigMatrixMuliplication might s...

9 years ago | 0

Answered
Dumb mistakes we make with MATLAB.
c = {'a', 'b', 'c'} c(2) = '' >> c = {'a', 'c'} Ups. I meant C{2} = ''. Another variant: c = cell(1, 100); ...

9 years ago | 1

Answered
For-loop matrix where the elements increase by 1
The elements increase by 1. This leaves some degrees of freedom: Should the increasing be row-wise or column-wise? What is the s...

9 years ago | 0

Answered
Help Graphing a Parabola
T is a [1 x 2] vector. Then x_graph and y_graph have 2 elements also. With these two points, you can either draw 2 points or a l...

9 years ago | 1

Answered
What is wrong with this arithmetic array?
The instructions are clear: Add adjustVal to each element of array originalReadings "add" means the + operation, not a c...

9 years ago | 0

| accepted

Answered
What is wrong with this array
The instruction is clear: Construct a row array countValues from 1 to endValue But you create two arrays called countVal...

9 years ago | 0

Answered
Is this the proper way of using ListBox?
Yes. This is a proper way. It would be tiny bit safer to replace axes(handles.axes1); image(I); by image(hand...

9 years ago | 0

| accepted

Answered
I need help plotting Eulers Method
How to plot what? The values of t and y for all steps? y = 750000; h = 0.01; t = 0; c = 0; yv = []; tv = [];...

9 years ago | 1

| accepted

Answered
sort a matrix without using sort function
Here a solution, which I would not submit except with a bold explanation: B = zeros(size(A)); n = size(A, 2); for iRo...

9 years ago | 1

Answered
Average in a matrix with different intervals
Assuming the that the date and time is stored as |datenum|: Date = linspace(datenum('01-Jan-2017'), datenum('01-Jul-2017'),...

9 years ago | 0

Answered
Hello. I am trying to find the maximum coefficient of a matrix (without using the 'max'), and this is my first code ever on Matlab, so I'm not sure how coherent this is. Any help would be much appreciated!
If you want to find the greatest element, why do you calculate e.g. s=s+A(2)? It is not clear, what your code should do. The ...

9 years ago | 0

Answered
How to get this function to output every iteration? It only formats the last iteration into the table
N = 20; Table = zeros (N+1,2); % Not N for i = 0 : N x = i; delx = x/1000; ...

9 years ago | 0

Answered
(1/2) - (3-j4)/(5-j8)
a = (1/2) - (3-4j) / (5-8j) >> -0.0280898876404494 -0.0449438202247191i x = real(a) y = imag(a) Does this help...

9 years ago | 0

Answered
Add image (logo) to GUI and hide it with pushbutton
Toggle the visibility of the image, not of the axes: axes(handles.SmileG) smileg=imread('logo.jpg'); handles.SmileLog...

9 years ago | 0

| accepted

Answered
For loop Optimization?
The |exp()| function is expensive. So start with avoiding repeated calls with the same argument: C = exp((2i * pi * t) .* f...

9 years ago | 0

| accepted

Answered
what is repmat() doing in the following code?
|repmat| does exactly, what is explained in the documentation. See |doc repmat|: The contents of the array |handles.img| is r...

9 years ago | 0

| accepted

Answered
Please help me with coding up "-5 < x < 3"
It depends on what "x" is and what you want as output. Please post more details, because letting the readers guess the intention...

9 years ago | 0

| accepted

Answered
How do I remove rows if the sum of its cells equals to a specific value?
This works fluently without a loop: toDelete = (sum(A, 2) == -104000); A(toDelete, :) = []; Your loop has the p...

9 years ago | 3

| accepted

Answered
getappdata works to load a variable that was never set?
It is a bad style to share data using the root object 0. This has the same problems as using global variables and you find thous...

9 years ago | 0

| accepted

Answered
How to make an index of the points of a vector that can then be used in a matrix
If you need the indices instead of the values, simply use the indices instead of the values :-) function [Points, Elements]...

9 years ago | 0

Answered
matlab crashes exception code 0xc0000374
Check the system files at first from the Windows Command window: sfc /scannow Note that it is unlikely, that the problem...

9 years ago | 1

Answered
Can some one help me on how to make a start to this question!!
Start with defining a function with the given inputs and output. Then find the formula you should implement. Of course all input...

9 years ago | 0

Answered
Code wont work keeps giving error message: Argument to dynamic structure reference must evaluate to a valid field name.
In "exp.(-z*wn*t)" the term "exp" is treated as a struct and "(-z*wn*t)" as a field name. "S.(name)" is a reference by a dynamic...

9 years ago | 0

Answered
Function takes too long time to run and Warning in interpolation
Letting an array shrink iteratively is surprisingly expensive, exactly as the growing. Avoid this strictly. The branch ...

9 years ago | 0

| accepted

Answered
Increase by 1 each element of a matrix at a time
n = 4; L = 50; M = ones(n, n); n2 = n*n; ready = false; while ~ready ... do what ever you l...

9 years ago | 0

Answered
How can I rename all columns in a table using a cell array?
col_labs{i}={strcat(char(table_columns_1(i)),'_',int2str((counter)))}; creates a cell, which contains cell strings. Better:...

9 years ago | 0

Load more