답변 있음
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...

대략 4년 전 | 1

답변 있음
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{...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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",[],... ...

4년 초과 전 | 0

답변 있음
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. ...

4년 초과 전 | 0

질문


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 ...

4년 초과 전 | 답변 수: 2 | 2

2

답변

답변 있음
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...

4년 초과 전 | 1

| 수락됨

질문


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...

4년 초과 전 | 답변 수: 1 | 0

1

답변

답변 있음
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...

4년 초과 전 | 1

| 수락됨

답변 있음
Check for most occurent result in every index of a string array, how? Mean of string array.
I'm not completely sure I get the question, but in theory you could simply convert the char array to numbers and revert to chara...

4년 초과 전 | 0

질문


Use of SizeChangedFcn for altering labels
I have created a function (attached fixticks.m) which I often find more convenient than using xtickformat as it is more dynamic ...

4년 초과 전 | 답변 수: 0 | 0

0

답변

답변 있음
Creating a code that calculates acceleration simulation
x = [0, 10, 20, 30, 40, 50]; %time in minutes y = [0, 60, 120, 280, 150, 40]; %distance travelled in x minutes xForward = x...

4년 초과 전 | 0

답변 있음
Add markers to stem plot above a threshold
Either by plotting the stem plot in two steps (over and under cutoff) data = rand(18,1)+randperm(18)'; figure;axes;hold on; c...

4년 초과 전 | 0

답변 있음
Create results .txt files with loop
Yes you should use fprintf - but you need a format input as well to get new lines. textfile = 'data1.txt'; fid = fopen(textfil...

4년 초과 전 | 0

답변 있음
plotting two curves together in one graph for different intervals
Hi Tania When plotting a function you've already described as a function handle I'd use fplot rather than plot. As far as I ca...

4년 초과 전 | 1

| 수락됨

답변 있음
Find the average for a matrix excluding data in the first column
You could simply add another mean around it: totalave = mean(mean(sensor(:,2:6))); Or you could introduce a temporary variable...

4년 초과 전 | 0

답변 있음
Plotting with categorical data
Based on the help for the bar plot function with categoricals the solution is possibly to use the reordercats function. I found...

4년 초과 전 | 1

| 수락됨

답변 있음
How to plot this function
You need to use the element-wise multiplication/division (.* or ./) rather than the matrix based multiplication (* or /). See a...

4년 초과 전 | 1

답변 있음
input function as plot title?
I think this would do it function_name = input('Enter a function:','s'); fh = str2func(strcat('@(x)',function_name)); fpl...

4년 초과 전 | 0

답변 있음
month number to month name function
This snippet should do it using existing functions. month_number = 11; month_name = datestr(datetime(1,month_number,1),'mmmm')...

4년 초과 전 | 2

답변 있음
Using name of saved matrix
I think you should go a different route where you don't save your variables to .mat files and simply keep the variables in your ...

4년 초과 전 | 1

| 수락됨

답변 있음
least square solution of linear system of equations
Although you should do your homework yourself I think I can help you : ) This problem could be solved with the backslash operat...

4년 초과 전 | 0

| 수락됨

답변 있음
Create a triangular function
Hi Mikkel I'm not quite sure whether I have understood how much of a mathematical function you would prefer for the graph to be...

4년 초과 전 | 0

| 수락됨

더 보기