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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 1

Beantwortet
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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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'))

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 2

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 2

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

mehr als 8 Jahre vor | 0

Beantwortet
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); ...

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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))

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

Mehr laden