How can I generate a grid schematic in MATLAB?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Hi guys, I am currently working on a GUI to model the effects of low temperature on a PV array. The GUI (as made from the GUIDE) as of now takes in user inputs from text boxes in order to change some of the parameters of the PV modules (such as short circuit current and ideality factor).
However, the GUI ideally should be able to output a grid of cells whose dimensions correspond to however many cells are wired in series and in parallel. The user would then click on individual cells and be able to change the individual characteristics of each cell and view its IV curve.
How can you generate a grid of images that can change according to user input? For example if the user states that there are 2 rows of 5 cells wired in series connected to each other in parallel, the GUI will display a 2x5 array of cells. I have the actual equations written for manipulating the IV curves already written but I don't know how to generate this grid of cells.
Thanks in advance!
댓글 수: 2
Sara
2014년 7월 29일
What do you need to plot the cells for? Are they editable or is that just an image? Do you want to show connections among them too? can you attach an image of what you want (done in power point, or paint, or by hand and scanned,..., nothing fancy needed)?

Something like this, it should just be an image (not editable), but the actual array should change. For example, I have attached a 3x5 array. I would want this to also generate a 4x5 and any n x m array.
Each of the individual cells can be selected by the user and have its individual IV curve and parameters shown/edited.
채택된 답변
Sara
2014년 7월 29일
댓글 수: 15
Roel
2014년 7월 30일
This is great! I figured out the handle for nrow and ncol. I have one last question though. How can I manipulate ginput so that it can change values in an array in that index. In the GUI I have written, I model solar cells in series and parallel by replicating and summing the vectors for Voltage and Current to approximate Ohm's law.
So say the user clicks the 3rd cell in row 1, how can I use ginput to change that corresponding entry in the voltage and current arrays? In this example, I would want to change the values for the 3rd entry in the voltage array.
Anyway, Thanks so much
I don't understand what you are trying to do. The counter in the while loop will give you the element. You can convert that to row and col index as:
row = ceil(cont / ncol);
col = cont-(row-1)*ncol; %check to make sure I got it right :)
This is counting from the bottom left of the pic. But with a similar logic you can count from top left if you prefer. So now that you have the element chosen by the user, I don't understand what you want to do.
Roel
2014년 7월 30일
I have attached the .m file of what I currently have for manipulating the IV curves. Sorry for being vague. So in lines 71 and 90 I replicate the matrix for current and voltage respectively in order to model how the IV curves change according to how many cells are in series and in parallel.
I would like to be able to do the following: So initially I replicate the IV characteristics of an ideal solar cell according to how many cells (in series and parallel) are in the array. The user can then select one cell in the array, and then change its characteristics (ideality factor, Series Resistance, short circuit current, etc.). For example say we have 3 identical cells wired in series with Series Resistance of [0 0 0] (vector input for the 3 junctions of the solar cell model I'm using) ohms each. I would like to plot the IV curve of this array under these conditions. Then I would want to change the 2nd cell to have a series resistance of [0 0.2 0] and plot the IV curve of the array under those conditions. How would I do this
Sara
2014년 7월 30일
There's no file.
Roel
2014년 7월 30일
sorry, fixed that.
Sara
2014년 7월 30일
Can you attach the whole script + the GUI (fig file)? Here's my questions:
- when the user select a cell, will he be shown some edit boxes where he can change the params, e.g., ideality factor?
- if yes to the previous, after the user changes params, do you have a pushbutton to signal it's time to plot the IV curve?
Roel
2014년 7월 30일
Sara
2014년 7월 30일
As a fast solution, couldn't you add a listbox where you choose which cell to modify instead of accepting arrays in input?
Roel
2014년 7월 30일
How would I be able to implement that? I thought listboxes were mainly for different cases. I don't know how it would behave in larger arrays (1000+ cells)
Sara
2014년 7월 30일
You could have two, indicating row and col, and populate them depending on the user inputs. It's better than having to input 1000+ arrays by hand IMO. You could still select the box from the image with ginput as a plus.
Roel
2014년 7월 30일
I see. Well I don't plan to have the user input 1000+ arrays by hand, I am sorry if that's what it seemed like. I would want the program to first model an array of identical cells by default. The user would then choose 1 cell, change its params, and then the IV curve of the whole array would update upon clicking plot
Sara
2014년 7월 30일
So are you planning on using the edit boxes for one component at a time, i.e. the component chosen from the schematic of the circuit?
Roel
2014년 7월 30일
Yes! Either one component or one string of components in series. Not only chosen from the schematic but also if the user chooses a value. Like cell(1,2) would be cell in row 1 col 2. Which I guess would be the same for clicking it.
Sara
2014년 7월 30일
Ok, it took me a while but I finally understood. So, where do you load a default size of the array + default values that the user can change in your code?
Roel
2014년 7월 30일
As of now they don't have default values, the user would input the values according to the type of solar cell they are working with. But soon I will set it to the default values of the type of cells we use in our lab, which is:
Series res: [0 0 0] Shunt res: [10000 10000 10000] Short circuit current: [1.8 1.9 3] Open circuit voltage: [1.4 1 0.3] Ideality factor: [3 3 3]
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
참고 항목
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
