Answered

How can I make a sentence in Alphabetical order

I think a minor modification of your function like this function[output] = sentenceSort(x) %%%The input x is a string array o...

How can I make a sentence in Alphabetical order

I think a minor modification of your function like this function[output] = sentenceSort(x) %%%The input x is a string array o...

11 dagar ago | 0

| accepted

Answered

I have to generate an array of 10x1 in an ascending order. With a condition that the two consecutive elements should have a difference between 1 to 8

This is not a super elegant solution but I think it'll do the trick for you numbers = zeros(10,1); numbers(1) = randi(8,1); %I...

I have to generate an array of 10x1 in an ascending order. With a condition that the two consecutive elements should have a difference between 1 to 8

This is not a super elegant solution but I think it'll do the trick for you numbers = zeros(10,1); numbers(1) = randi(8,1); %I...

6 månader ago | 0

Answered

Switch-case function problem

If you wish to solve the problem using a switch/case sentence you should omit the == as that is assumed for the case. Furthermor...

Switch-case function problem

If you wish to solve the problem using a switch/case sentence you should omit the == as that is assumed for the case. Furthermor...

6 månader ago | 1

Question

Reading settings for an app from text file

I have designed an app for which I need to store some settings in a text file as shown in the attached example_file.ini. In my ...

7 månader ago | 1 answer | 0

Answered

Linear Interpolation to eleminate zero values

I'm not sure I fully understand your issue, but this may be a solution (or something to point you in the direction) y = [1 2 1 ...

Linear Interpolation to eleminate zero values

I'm not sure I fully understand your issue, but this may be a solution (or something to point you in the direction) y = [1 2 1 ...

7 månader ago | 0

| accepted

Answered

How to obtain moving average smoothing of daily time series?

I think the function you need is filter - but that requires a numeric input (for which I would use the datenum function) timese...

How to obtain moving average smoothing of daily time series?

I think the function you need is filter - but that requires a numeric input (for which I would use the datenum function) timese...

7 månader ago | 1

Answered

Linear regression on training set

the five t values that will correspond to the randomly chosen values are used by using the idx vector similarly to what you do f...

Linear regression on training set

the five t values that will correspond to the randomly chosen values are used by using the idx vector similarly to what you do f...

7 månader ago | 1

Answered

recursive function to check a Palindrome

There is no need to make it recursive or to look for multiple numel's function out = palindrom(x) x = upper(char(varargin{...

recursive function to check a Palindrome

There is no need to make it recursive or to look for multiple numel's function out = palindrom(x) x = upper(char(varargin{...

7 månader ago | 0

Answered

Easy and fast way to export into excel file from loop

You should concatenate your E variable before writing the excelfile as xlswrite creates a file rather than edits a file. As an a...

Easy and fast way to export into excel file from loop

You should concatenate your E variable before writing the excelfile as xlswrite creates a file rather than edits a file. As an a...

7 månader ago | 0

| accepted

Answered

Read from text file (vw9.out)

You can read it using fid = fopen('vw9.out','r'); fcon = textscan(fid,'%s'); but if all you want to do is to import the matri...

Read from text file (vw9.out)

You can read it using fid = fopen('vw9.out','r'); fcon = textscan(fid,'%s'); but if all you want to do is to import the matri...

7 månader ago | 0

| accepted

Answered

Plotting the 4th value from a data

Hi Abdul I certainly think so. I've define a data vector that's sinus of numbers from -10 to 10 in 111 steps - but use your own...

Plotting the 4th value from a data

Hi Abdul I certainly think so. I've define a data vector that's sinus of numbers from -10 to 10 in 111 steps - but use your own...

8 månader ago | 0

Answered

Adding a Title to imwrite Command

You have to add the title to your figure before using imwrite. If it is indeed images (.jpg, .tiff etc) that constitutes your p...

Adding a Title to imwrite Command

You have to add the title to your figure before using imwrite. If it is indeed images (.jpg, .tiff etc) that constitutes your p...

8 månader ago | 0

| accepted

Answered

find the sum by function

function total = grade_eyad(v) [~,idx] = min(v); %finding the position of the minimum value (3 in the given example) v...

find the sum by function

function total = grade_eyad(v) [~,idx] = min(v); %finding the position of the minimum value (3 in the given example) v...

9 månader ago | 0

Answered

need help find the sum of the vector by the function

Under the assumption that only one instance of the minimum grade should be replaced, and that the minimum grade should be includ...

need help find the sum of the vector by the function

Under the assumption that only one instance of the minimum grade should be replaced, and that the minimum grade should be includ...

9 månader ago | 0

Answered

Standard deviation error bars not in the centre of the bar

You're just missing the y input for your errorbar. I belileve your problem will be solved by just replacing eb = errorbar(avera...

Standard deviation error bars not in the centre of the bar

You're just missing the y input for your errorbar. I belileve your problem will be solved by just replacing eb = errorbar(avera...

9 månader ago | 0

| accepted

Answered

How to plot three functions in three separate figures and simultaneously in one figure but in three different windows of the same figure?

Look in the documentation for the function subplot figure; subplot(3, 1, 1); plot(z,A); subplot(3, 1, 2); plot(z,B); subpl...

How to plot three functions in three separate figures and simultaneously in one figure but in three different windows of the same figure?

Look in the documentation for the function subplot figure; subplot(3, 1, 1); plot(z,A); subplot(3, 1, 2); plot(z,B); subpl...

9 månader ago | 0

| accepted

Answered

How can my outputs be assigned to each image that is being processed

I would assign the outputs either to a multidimensional struct: output = repmat(struct("RGB",[],... "grayimage",[],... ...

How can my outputs be assigned to each image that is being processed

I would assign the outputs either to a multidimensional struct: output = repmat(struct("RGB",[],... "grayimage",[],... ...

10 månader ago | 0

Answered

Text orientation right to left

I'm not fully sure if this adresses your problem - but this does something along the lines of orienting the text right to left. ...

Text orientation right to left

I'm not fully sure if this adresses your problem - but this does something along the lines of orienting the text right to left. ...

10 månader ago | 0

Question

Use string or character arrays in code?

I am writing a few functions and scripts performing operations on files and content from files. Often I use sprintf, uigetfile ...

10 månader ago | 2 answers | 1

Solved

Matlab Basics - Convert a row vector to a column vector

Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

11 månader ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

11 månader ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

11 månader ago

Solved

find the surface area of a cube

given cube side length x, find the surface area of the cube, set it equal to y

11 månader ago

Solved

Is the input divisible by 3?

Return true if the input is divisible by 3 and false if not.

11 månader ago

Solved

Binary numbers

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

11 månader ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

11 månader ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

11 månader ago

Answered

Pick a time in app

As apparently this feature has not been implemented in the app designer I decided on making an app of my own doing that exact th...

Pick a time in app

As apparently this feature has not been implemented in the app designer I decided on making an app of my own doing that exact th...

11 månader ago | 0

| accepted

Question

Pick a time in app

Is it possible to pick a specific time of a specific day from an app? The DatePicker component allows for selection of a specif...

11 månader ago | 1 answer | 0

Answered

Plotting connected dots with two different colors (One for the dots and one for the lines)

It is the 'MarkerEdgeColor' and 'MarkerFaceColor' properties. data = randn(4,1)*3; figure; p = plot(data,'-','color',[0.7 0 0...

Plotting connected dots with two different colors (One for the dots and one for the lines)

It is the 'MarkerEdgeColor' and 'MarkerFaceColor' properties. data = randn(4,1)*3; figure; p = plot(data,'-','color',[0.7 0 0...

11 månader ago | 1

| accepted