Risposto
I want to read multiple non-adjacent columns from an excel spreadsheet
I would read the entire file and select the data in Matlab afterwards. You need the Excel syntax in the string. I don't think it...

oltre 9 anni fa | 1

Risposto
What is the alternative for function tril(n), which is executed without using loops??
Without any context for your use, it is impossible to suggest methods to vectorize your code. As Adam mentioned, tril itself doe...

oltre 9 anni fa | 0

Risposto
Storing Numbers from Function in a Script
The solution Sonam Gupta offered is one way to adapt your code for indexing, but it does not support other step sizes than 1. Th...

oltre 9 anni fa | 1

| accettato

Risposto
Writing an exponential equation in the title
This syntax is essentially calling TeX, so it follows that syntax. It doesn't, however support accolades for grouping commands, ...

oltre 9 anni fa | 0

Risposto
how to select particular rows from a matrix
You can use _ismember_ to select the country, then you can convert those rows (excluding the first column) to a matrix with _cel...

oltre 9 anni fa | 0

Risposto
how to save multiple figure without displaying
You can't combine the attributes with the number syntax at figure creation, so you'll have to use your current solution. If you ...

oltre 9 anni fa | 1

Risposto
I've already activated MATLAB on my computer and have been using it. It does not need to be renewed. It keeps opening the Activation Module now, asking for an Activation Key, but I've already used mine. How do I fix this?
You haven't mentioned what happens when you try to activate anyway. You can always contact Mathworks directly with the contac...

oltre 9 anni fa | 0

Risposto
Hi, I want to plot 4 y-axes against x-axis. How do I plot it?
Another interpretation of your question results in this solution: x = linspace(0,2*pi); y1 = sin(x); y2 = sin(5*x); y3= si...

oltre 9 anni fa | 1

Risposto
why can not download MATLAB?
You should contact Mathworks directly with the <http://www.mathworks.com/company/aboutus/contact_us.html?s_tid=gn_cntus Contact ...

oltre 9 anni fa | 0

| accettato

Risposto
How can I create a bar plot from sorted values with correct sorted label values?
As far as I understand this plot and the axis and bar objects it contains, you have only put in 4 years, but you have many more ...

oltre 9 anni fa | 0

Risposto
locating and returning minimum of 3D plots
If you try the code below to find x_opt and y_opt, you should get a plot, so see if that is what you mean. z2=z(x,y); [x...

oltre 9 anni fa | 0

Risposto
How to select specific legend entries for bar chart
You can compile a vector of handles and use that as the pointer for legend h_list=[]; hold on for i=1:n xlabe...

oltre 9 anni fa | 1

| accettato

Risposto
Finding Partitions of data (with nchoosek)
Do you need the indices? If not you could go for randperm (which should scale better) with nulling. A=[1 2 3 4 5]; Items...

oltre 9 anni fa | 2

| accettato

Risposto
Urgent Puedo instalar Matlab en windows vista de 32-bit
Este es un foro en inglés. Desde la versión R2016a, Matlab no soporta 32-bit. Puedes descargar la versión 2015b <https://www.mat...

oltre 9 anni fa | 0

Risposto
Please help me in generating new row vectors from a given row vector.
You need to think if you don't want the results in a matrix or a cell. Below is an adaptation that should do what you want. ...

oltre 9 anni fa | 0

| accettato

Risposto
export cell array of two strings of different dimension to an excel file
You need to extend your variables so they have equal lengths, which you can do in a way similar to the code below. A={'Arut...

oltre 9 anni fa | 1

| accettato

Risposto
Hello! :D i would like to ask if how can you adjust the "origin" to a specific coordinate.
What do you want, change the axis, or alter the coordinates? For the first option use _axis([xmin xmax ymin ymax])_, for the sec...

oltre 9 anni fa | 0

| accettato

Risposto
I have convertes matrix in to blocks as given and i want to access single element of block , How to access it plz tell someone .
As Jan says, it is not clear what you mean. I'm going to guess you want to access single elements of a matrix inside the cell. ...

oltre 9 anni fa | 0

Risposto
How can I read in rows from an Excel spreadsheet one after the other using for loop?
I you want to use the _num = xlsread(filename,sheet,xlRange)_ syntax, you need to use the Excel syntax, but that should be in a ...

oltre 9 anni fa | 0

| accettato

Risposto
How to perform fft
[moved from comments] To remove the 0Hz-component from the analysis, use y=fft(x-mean(x));

oltre 9 anni fa | 0

| accettato

Risposto
Organising/Sorting imported files into matlab
You can use the num2str function, but you should use sprintf instead (string-print-formatted, use fprintf to print formatted thi...

oltre 9 anni fa | 0

| accettato

Risposto
How to find variance and std in matlab without using zeros in matrix?
In my solution, I abuse the option of omitting NaNs when using mean and std pm2d_temp=pm2d;%create a copy pm2d_temp(pm2d_t...

oltre 9 anni fa | 2

Risposto
How to calculate velocity at each timestep for this problem? (Image Included)
_(This answer could do with some working out, so let me know if you need to see more code. It is more a sketch of an approach, b...

oltre 9 anni fa | 1

| accettato

Risposto
force an image file to be in landscape mode
Do you really need to export it as the result of a figure? Anyway, you can use imwrite(imrotate(imread(imagefilename),90),...

oltre 9 anni fa | 0

Risposto
adding a string to the file name for all files
You can use the function dir find out the file names in a folder. If you Google on [rename files matlab], you can find this answ...

oltre 9 anni fa | 2

| accettato

Risposto
Help with rowfun?
You should have the helper function with some output (one or multiple scalars (single values)). Then, in your code you can use ...

oltre 9 anni fa | 0

Risolto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

oltre 9 anni fa

Risolto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

oltre 9 anni fa

Carica altro