Answered
Using a variable as both output and input and writing a condition in a function
When you write function [lamda, lambdap,phip] = Palaeomagfun(I ,lamda,lamdax,phix ) lamda=atand(tand(I)/2) %in degree ...

8 years ago | 0

| accepted

Answered
How can I plot polar plot from -pi to pi instead of 0 to 2*pi?
What error do you get? I tried the below and I don't get any error. theta = linspace(-pi,pi,25); rho = 2*theta; p ...

8 years ago | 0

| accepted

Answered
Multiply 4D array with 2D array without a for loop
Try this, bsxfun(@times,S(:,:,1,:),C) but remember, the result you'll get as a 3D matrix.

8 years ago | 1

Answered
Map a matrix 300 cells of matrices to a 2d matrix
dummy = repmat({reshape(1:784,28,28)},1,300); C = cell2mat(cellfun(@(x) [x(:)],dummy,'uni',0)); or simpler, C = resh...

8 years ago | 0

| accepted

Answered
Help with loops calculating value
I don't clearly understand what you're trying to do but it looks like you may want to use a while loop, while abs((I-Iold)/I...

8 years ago | 0

Answered
Save multiple run result of script
*EDITED* numOfRuns = 5; for n=1:numOfRuns s = fitness(D,vect); save(['result_data_run_number_' num2str(n) ',ma...

8 years ago | 1

| accepted

Answered
Sort a matrix according to the index of a vector
if you want to sort the rows of |D| according to isort, try newD = D(isort,:) newD = 0 0.8000 0.2...

8 years ago | 1

Answered
Find Index Positions of a Small Array values in a Global Array
G = [1; 4; 6; 9; 13; 17; 26; 33; 47]; S= [6; 26; 47]; find(ismember(G,S)) ans = 3 7 9

8 years ago | 0

| accepted

Answered
Two x-axis for the same plot line
If you have R2014b or later, just like utilizing both sides of the y axis, you can also use top and bottom side of x axis. re...

8 years ago | 0

Answered
How to make a variable content part of a path
filepath = '/Users/Y*****/Downloads/case_data/train2/3'; filename = 'file001.txt'; and then use fullfile fid_out = ...

8 years ago | 0

| accepted

Answered
how to call number inserted in "edit text" into the formula that i have code in "push button" for GUI?
use |get|, S = str2double(get(editBoxHandle, 'string'))

8 years ago | 0

| accepted

Answered
How do i put in a bar group the value of each bar on top?
Try this, Y_as = [ 165 160 121 ; 59 84 62 ; 106 76 58 ] ; X_as = categorical({'1. apples & pears' , '2. apples', '3. pea...

8 years ago | 2

| accepted

Answered
How to compare real time with an entered time in a table cell in guide GUI?
you can get the current time by using, >> curr_time = datetime('now') curr_time = datetime 2017...

8 years ago | 0

| accepted

Answered
Need help with determining proper function input dimensions
Without knowing what the function does or supposed to do it's hard to guess. There are also many other undefined functions insid...

8 years ago | 0

Answered
Why won't matlab produce any output in the command window?
If you use semcolon *(;)* by the end of your command, the output on the command line will be suppressed. If you want to see a ma...

8 years ago | 2

Answered
Incrementing File names access
If your text files are in the same folder, then use |dir|, <https://www.mathworks.com/help/matlab/ref/dir.html> folderInf...

8 years ago | 0

Answered
Removing specific elements from vector
Your question is not very clear. First you're defining, |M,K,N| and |F|, M=32; K=1; N=M-K; F=exprnd(1,1,M); ...

8 years ago | 0

| accepted

Answered
Pass data from figure to main GUIDE pushbutton callback function
You need to update the hObject handle using, guidata(hObject,handles); Upon edit, save the new table data in this handle,...

8 years ago | 1

| accepted

Answered
Title with multiple outputs
Try this, title(['k = ' num2str(k) ' t/T = ' num2str(t/T) ' \theta_p = '... num2str(theta_p) '\circ C_{\Upsilon} = '...

8 years ago | 1

Answered
Trouble creating an element-wise nested structure: Subscripted assignment dimension mismatch
Instead of storing 3 vectors for each joints, I'd recommend using a 3x3 matrix. Place it in a structure with more meaningful nam...

8 years ago | 0

Answered
How can I eliminate this error?
_How can I elmiate this error?_ Simple. Provide an input of supported format. The error message even specifies the supported ...

8 years ago | 0

Answered
How Can I Create Figure Like Bar
how about a stacked bar? <https://de.mathworks.com/help/matlab/ref/bar.html> bar(data,'stacked')

8 years ago | 0

Answered
Wiered Matlab Matrix Multiplication
it is coming from M*[ddtheta1; ddtheta2] + C + G if you do not put a <https://en.wikipedia.org/wiki/Semicolon semicolon> ...

8 years ago | 0

Answered
Place a pushbutton on uitable to display new input data
set the |ColumnEditable| property true t.ColumnEditable = [true true]; and place a pushbutton on the figure and use its c...

8 years ago | 0

| accepted

Answered
How can I extract all values in a row of an array without the its maximum value
A = [5 3 9 10]; res = A(A~=max(A))

8 years ago | 0

Answered
Nesting function trouble with undefined variable
You're passing |d|,|e| to |nesty| function but you're using |a| on the right hand side of the equation. Do not expect matlab to...

8 years ago | 1

Answered
How can I change the scale of y axis from figure 1 to figure 2
Use handles. f1 = figure(1); h1 = plot(rand(3)); ax1 = gca; f2 = figure(2); h2 = plot(rand(5)); ax2 = gca; n...

8 years ago | 0

Answered
If I have a vector A with dimensions (1,3) and an other vector with dimensions B (3,1) , then the action A.*B is a matrix with dimensions (3,3) or a vector with dimensions (3,3) ?
I think you're confused with the terms, vectors and matrices. *Vectors or Arrays* These are one dimensional. They either h...

8 years ago | 0

Answered
how to call the data in matrix with the same value in one column
first get all the unique values of column 4 using, vals = unique(A(:,4)); then use indexing to filter, A(A(:,4)==va...

8 years ago | 0

| accepted

Answered
How to get index of each points in data?
Simply use sortrows, >> [B,index] = sortrows(A,4) B = 999 999 999 11 111 111 111 22 ...

8 years ago | 0

| accepted

Load more